@Priority(value=1000) public abstract class AuthFilter<C,P extends Principal> extends Object implements javax.ws.rs.container.ContainerRequestFilter
Modifier and Type | Class and Description |
---|---|
static class |
AuthFilter.AuthFilterBuilder<C,P extends Principal,T extends AuthFilter<C,P>>
Abstract builder for auth filters.
|
Modifier and Type | Field and Description |
---|---|
protected Authenticator<C,P> |
authenticator |
protected Authorizer<P> |
authorizer |
protected org.slf4j.Logger |
logger |
protected String |
prefix |
protected String |
realm |
protected UnauthorizedHandler |
unauthorizedHandler |
Constructor and Description |
---|
AuthFilter() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
authenticate(javax.ws.rs.container.ContainerRequestContext requestContext,
C credentials,
String scheme)
Authenticates a request with user credentials and setup the security context.
|
protected final org.slf4j.Logger logger
protected String prefix
protected String realm
protected Authenticator<C,P extends Principal> authenticator
protected Authorizer<P extends Principal> authorizer
protected UnauthorizedHandler unauthorizedHandler
protected boolean authenticate(javax.ws.rs.container.ContainerRequestContext requestContext, @Nullable C credentials, String scheme)
requestContext
- the context of the requestcredentials
- the user credentialsscheme
- the authentication scheme; one of BASIC_AUTH, FORM_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH
.
See SecurityContext
true
, if the request is authenticated, otherwise false
Copyright © 2019. All rights reserved.