Class PreAuthenticationFilter

java.lang.Object
io.milton.http.http11.auth.PreAuthenticationFilter
All Implemented Interfaces:
Filter

public class PreAuthenticationFilter extends Object implements 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 Details

  • Method Details

    • getCurrentRequest

      public static Request getCurrentRequest()
    • process

      public void process(FilterChain chain, Request request, Response response)
      Specified by:
      process in interface Filter
    • authenticate

      public Object authenticate(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.

      Returns null if no handlers support the request

      Parameters:
      request -
      Returns:
    • getChallenges

      public List<String> getChallenges(Request request)
      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