T - Support token typepublic interface Authenticator<T extends AuthenticationToken>
AuthenticationToken.
Every Authenticator declares supported AuthenticationToken type though getTokenType() method.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Authenticator.MessageAuthenticator
Authenticator which support authentication using generic authentication request
Messages. |
| Modifier and Type | Method and Description |
|---|---|
Authentication |
authenticate(T authenticationToken)
Attempts to perform authentication using given
AuthenticationToken. |
Class<? extends T> |
getTokenType()
Get supported
AuthenticationToken type |
Class<? extends T> getTokenType()
AuthenticationToken typeAuthenticationToken typeAuthentication authenticate(T authenticationToken) throws AuthenticationException
AuthenticationToken.
If the authentication is successful, an Authentication instance is returned that represents the user's
account data and provides authorization operations.
If authentication is not successful, a suitable exception should be thrown. See the specific exceptions listed below for builtin available authentication errors.
authenticationToken - the authentication request tokenAuthenticationException - Authentication failedDisabledAccountException,
LockedAccountException,
UnknownAccountException,
ExpiredCredentialsException,
InvalidCredentialsException,
UnsupportedTokenException,
UnexpectedAuthenticationExceptionCopyright © 2017 The Holon Platform. All rights reserved.