Interface Authenticator


public interface Authenticator
Used by the security framework to authenticate credentials.
  • Method Details

    • authenticate

      default Authentication authenticate(Credentials credentials) throws InvalidCredentialsException
      Authenticate the given credentials.
      Parameters:
      credentials - The credentials.
      Returns:
      The authentication.
      Throws:
      InvalidCredentialsException - if the credentials were invalid.
    • authenticate

      default Authentication authenticate(String securityID) throws InvalidCredentialsException
      Tests that a given securityID exists.
      Parameters:
      securityID - The securityID.
      Returns:
      An authentication for the user.
      Throws:
      InvalidCredentialsException - if there is no user with the given security ID.
    • lookupPrincipal

      Optional<Principal> lookupPrincipal(String securityID)
      Look up the user with the given security ID.
      Parameters:
      securityID - The security ID.
      Returns:
      The user's principal as an optional.
    • lookupPrincipal

      Optional<Principal> lookupPrincipal(Credentials credentials)
      Look up the user with the given credentials.
      Parameters:
      credentials - The user's credentials.
      Returns:
      The user's principal as an optional.
    • getAuthenticationValidDuration

      default Duration getAuthenticationValidDuration()
      Returns:
      The duration an authentication is valid.