Class SecurityManagerBasicAuthHandler

java.lang.Object
io.milton.http.http11.auth.SecurityManagerBasicAuthHandler
All Implemented Interfaces:
AuthenticationHandler

public class SecurityManagerBasicAuthHandler extends Object implements AuthenticationHandler
Author:
brad
  • Constructor Details

    • SecurityManagerBasicAuthHandler

      public SecurityManagerBasicAuthHandler(SecurityManager securityManager)
  • Method Details

    • credentialsPresent

      public boolean credentialsPresent(Request request)
      Description copied from interface: AuthenticationHandler
      Determine if there are login credentials present. Should not attempt to validate credentials. Should only determine if something has been provided
      Specified by:
      credentialsPresent in interface AuthenticationHandler
      Returns:
    • supports

      public boolean supports(Resource r, Request request)
      Description copied from interface: AuthenticationHandler
      Returns true if this supports authenticating with the given Auth data on the given resource. Only the first AuthenticationHandler which returns true for supports will be used for authentication. Ie supports implementations should be mutually exclusive
      Specified by:
      supports in interface AuthenticationHandler
      Parameters:
      r - - the resource being access
      Returns:
    • authenticate

      public Object authenticate(Resource resource, Request request)
      Description copied from interface: AuthenticationHandler
      Authenticate the details in the request for access to the given resource.
      Specified by:
      authenticate in interface AuthenticationHandler
      Returns:
    • appendChallenges

      public void appendChallenges(Resource resource, Request request, List<String> challenges)
      Description copied from interface: AuthenticationHandler
      Create a challenge for this authentication method. This should be completely formatted as per http://tools.ietf.org/html/rfc2617 and appended to the given list of challenges. It is allowable to append more then one challenge if appropriate
      Specified by:
      appendChallenges in interface AuthenticationHandler
      challenges - - the list of challenges to append to, or not, as appropriate
    • isCompatible

      public boolean isCompatible(Resource resource, Request request)
      Description copied from interface: AuthenticationHandler
      Returns true if this authentication handler is compatible with the given resource This is used when authorisation has failed, in generating challenge responses If you don't want to add a challenge response, return false
      Specified by:
      isCompatible in interface AuthenticationHandler
      Returns:
      - true if this can authenticate the resource, and it should issue a http challenge
    • getSecurityManager

      public SecurityManager getSecurityManager()