Package io.dropwizard.auth.chained
Class ChainedAuthFilter<C,P extends Principal>
- java.lang.Object
-
- io.dropwizard.auth.AuthFilter<C,P>
-
- io.dropwizard.auth.chained.ChainedAuthFilter<C,P>
-
- Type Parameters:
C
- the type of Credentials to be authenticatedP
- the type of the Principal
- All Implemented Interfaces:
javax.ws.rs.container.ContainerRequestFilter
@Priority(1000) public class ChainedAuthFilter<C,P extends Principal> extends AuthFilter<C,P>
Chains together authFilters, short circuits when the first filter successfully authenticates N.B. AuthFilters can be chained together as long as they produce the same type of Principal. This is not enforced by the type system at compile time, using inconsistent principals will lead to runtime errors There is no requirement for the filters that are chained to use the same type for credentials. The reason is that the ChainedFilter delegates to a filter which encapsulates the authenticator and credential type
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.dropwizard.auth.AuthFilter
AuthFilter.AuthFilterBuilder<C,P extends Principal,T extends AuthFilter<C,P>>
-
-
Field Summary
-
Fields inherited from class io.dropwizard.auth.AuthFilter
authenticator, authorizer, logger, prefix, realm, unauthorizedHandler
-
-
Constructor Summary
Constructors Constructor Description ChainedAuthFilter(List<AuthFilter> handlers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(javax.ws.rs.container.ContainerRequestContext containerRequestContext)
-
Methods inherited from class io.dropwizard.auth.AuthFilter
authenticate
-
-
-
-
Constructor Detail
-
ChainedAuthFilter
public ChainedAuthFilter(List<AuthFilter> handlers)
-
-
Method Detail
-
filter
public void filter(javax.ws.rs.container.ContainerRequestContext containerRequestContext) throws IOException
- Throws:
IOException
-
-