Package io.dropwizard.auth
Class AuthFilter.AuthFilterBuilder<C,P extends Principal,T extends AuthFilter<C,P>>
java.lang.Object
io.dropwizard.auth.AuthFilter.AuthFilterBuilder<C,P,T>
- Type Parameters:
C
- the type of credentials that the filter acceptsP
- the type of the principal that the filter accepts
- Direct Known Subclasses:
BasicCredentialAuthFilter.Builder
,OAuthCredentialAuthFilter.Builder
- Enclosing class:
- AuthFilter<C,
P extends Principal>
public abstract static class AuthFilter.AuthFilterBuilder<C,P extends Principal,T extends AuthFilter<C,P>>
extends Object
Abstract builder for auth filters.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBuilds an instance of the filter with a provided authenticator, an authorizer, a prefix, and a realm.protected abstract T
setAuthenticator
(Authenticator<C, P> authenticator) Sets the given authenticatorsetAuthorizer
(Authorizer<P> authorizer) Sets the given authorizerSets the given prefixSets the given realmsetUnauthorizedHandler
(UnauthorizedHandler unauthorizedHandler) Sets the given unauthorized handler
-
Constructor Details
-
AuthFilterBuilder
public AuthFilterBuilder()
-
-
Method Details
-
setRealm
Sets the given realm- Parameters:
realm
- a realm- Returns:
- the current builder
-
setPrefix
Sets the given prefix- Parameters:
prefix
- a prefix- Returns:
- the current builder
-
setAuthorizer
Sets the given authorizer- Parameters:
authorizer
- anAuthorizer
- Returns:
- the current builder
-
setAuthenticator
Sets the given authenticator- Parameters:
authenticator
- anAuthenticator
- Returns:
- the current builder
-
setUnauthorizedHandler
public AuthFilter.AuthFilterBuilder<C,P, setUnauthorizedHandlerT> (UnauthorizedHandler unauthorizedHandler) Sets the given unauthorized handler- Parameters:
unauthorizedHandler
- anUnauthorizedHandler
- Returns:
- the current builder
-
buildAuthFilter
Builds an instance of the filter with a provided authenticator, an authorizer, a prefix, and a realm.- Returns:
- a new instance of the filter
-
newInstance
-