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:
jakarta.ws.rs.container.ContainerRequestFilter
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidfilter(jakarta.ws.rs.container.ContainerRequestContext containerRequestContext) Methods inherited from class io.dropwizard.auth.AuthFilter
authenticate
-
Constructor Details
-
ChainedAuthFilter
-
-
Method Details
-
filter
public void filter(jakarta.ws.rs.container.ContainerRequestContext containerRequestContext) throws IOException - Throws:
IOException
-