Package io.milton.http.http11.auth
Class PreAuthenticationFilter
java.lang.Object
io.milton.http.http11.auth.PreAuthenticationFilter
- All Implemented Interfaces:
Filter
A filter to perform authentication before resource location.
This allows the authenticated context to be available for resource location.
Note that this filter contains a list of AuthenticationHandler. However,
these handlers MUST be designed to ignore the resource variable as it will
always be null when used with this filter. This approach allows these handlers
to be used with the post-resource-location approach.
-
Constructor Summary
ConstructorsConstructorDescriptionPreAuthenticationFilter(Http11ResponseHandler responseHandler, SecurityManager securityManager) PreAuthenticationFilter(Http11ResponseHandler responseHandler, SecurityManager securityManager, NonceProvider np) PreAuthenticationFilter(Http11ResponseHandler responseHandler, List<AuthenticationHandler> authenticationHandlers) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(Request request) Looks for an AuthenticationHandler which supports the given resource and authorization header, and then returns the result of that handler's authenticate method.getChallenges(Request request) Generates a list of http authentication challenges, one for each supported authentication method, to be sent to the client.static Requestvoidprocess(FilterChain chain, Request request, Response response)
-
Constructor Details
-
PreAuthenticationFilter
public PreAuthenticationFilter(Http11ResponseHandler responseHandler, List<AuthenticationHandler> authenticationHandlers) -
PreAuthenticationFilter
public PreAuthenticationFilter(Http11ResponseHandler responseHandler, SecurityManager securityManager) -
PreAuthenticationFilter
public PreAuthenticationFilter(Http11ResponseHandler responseHandler, SecurityManager securityManager, NonceProvider np)
-
-
Method Details
-
getCurrentRequest
-
process
-
authenticate
Looks for an AuthenticationHandler which supports the given resource and authorization header, and then returns the result of that handler's authenticate method. Returns null if no handlers support the request- Parameters:
request-- Returns:
-
getChallenges
Generates a list of http authentication challenges, one for each supported authentication method, to be sent to the client.- Parameters:
request- - the current request- Returns:
- - a list of http challenges
-