public interface Authenticator
Used by the security framework to authenticate credentials.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Authenticationauthenticate(Credentials credentials) Authenticate the given credentials.default Authenticationauthenticate(String securityID) Tests that a given securityID exists.default DurationlookupPrincipal(Credentials credentials) Look up the user with the given credentials.lookupPrincipal(String securityID) Look up the user with the given security ID.
-
Method Details
-
authenticate
Authenticate the given credentials.- Parameters:
credentials- The credentials.- Returns:
- The authentication.
- Throws:
InvalidCredentialsException- if the credentials were invalid.
-
authenticate
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
Look up the user with the given security ID.- Parameters:
securityID- The security ID.- Returns:
- The user's principal as an optional.
-
lookupPrincipal
Look up the user with the given credentials.- Parameters:
credentials- The user's credentials.- Returns:
- The user's principal as an optional.
-
getAuthenticationValidDuration
- Returns:
- The duration an authentication is valid.
-