Interface AuthenticationHandler

All Known Implementing Classes:
AppEngineDigestAuthenticationHandler, BasicAuthHandler, CookieAuthenticationHandler, DigestAuthenticationHandler, FormAuthenticationHandler, OAuth2AuthenticationHandler, SecurityManagerBasicAuthHandler, SecurityManagerDigestAuthenticationHandler

public interface AuthenticationHandler
Implementations of this interface are authentication methods for use with HTTP. These include basic, digest, ntlm etc
Author:
brad
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendChallenges(Resource resource, Request request, List<String> challenges)
    Create a challenge for this authentication method.
    authenticate(Resource resource, Request request)
    Authenticate the details in the request for access to the given resource.
    boolean
    Determine if there are login credentials present.
    boolean
    isCompatible(Resource resource, Request request)
    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
    boolean
    supports(Resource r, Request request)
    Returns true if this supports authenticating with the given Auth data on the given resource.
  • Method Details

    • supports

      boolean supports(Resource r, Request request)
      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
      Parameters:
      r - - the resource being access
      request -
      Returns:
    • authenticate

      Object authenticate(Resource resource, Request request)
      Authenticate the details in the request for access to the given resource.
      Parameters:
      resource -
      request -
      Returns:
    • appendChallenges

      void appendChallenges(Resource resource, Request request, List<String> challenges)
      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
      Parameters:
      resource -
      request -
      challenges - - the list of challenges to append to, or not, as appropriate
    • isCompatible

      boolean isCompatible(Resource resource, Request request)
      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
      Parameters:
      resource -
      request -
      Returns:
      - true if this can authenticate the resource, and it should issue a http challenge
    • credentialsPresent

      boolean credentialsPresent(Request request)
      Determine if there are login credentials present. Should not attempt to validate credentials. Should only determine if something has been provided
      Parameters:
      request -
      Returns: