public class DefaultJwtAuthenticator extends Object implements JwtAuthenticator
JwtAuthenticator implementation.| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultJwtAuthenticator.DefaultBuilder
Default
Builder implementation |
JwtAuthenticator.BuilderAuthenticator.MessageAuthenticator| Constructor and Description |
|---|
DefaultJwtAuthenticator()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Authentication |
authenticate(BearerAuthenticationToken authenticationToken)
Attempts to perform authentication using given
AuthenticationToken. |
JwtConfiguration |
getConfiguration()
Get the
JwtConfiguration to use to validate and authenticate the JWT tokens |
Collection<String> |
getIssuers()
Get the allowed JWT issuers
|
Collection<String> |
getRequiredClaims()
Get optional required JWT claims
|
Class<? extends BearerAuthenticationToken> |
getTokenType()
Get supported
AuthenticationToken type |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildercreatepublic JwtConfiguration getConfiguration()
JwtAuthenticatorJwtConfiguration to use to validate and authenticate the JWT tokensgetConfiguration in interface JwtAuthenticatorpublic Collection<String> getIssuers()
JwtAuthenticatorgetIssuers in interface JwtAuthenticatorpublic Collection<String> getRequiredClaims()
JwtAuthenticatorgetRequiredClaims in interface JwtAuthenticatorpublic Class<? extends BearerAuthenticationToken> getTokenType()
AuthenticatorAuthenticationToken typegetTokenType in interface Authenticator<BearerAuthenticationToken>AuthenticationToken typepublic Authentication authenticate(BearerAuthenticationToken authenticationToken) throws AuthenticationException
AuthenticatorAuthenticationToken.
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.
authenticate in interface Authenticator<BearerAuthenticationToken>authenticationToken - the authentication request tokenAuthenticationException - Authentication failedDisabledAccountException,
LockedAccountException,
UnknownAccountException,
ExpiredCredentialsException,
InvalidCredentialsException,
UnsupportedTokenException,
UnexpectedAuthenticationExceptionCopyright © 2019 The Holon Platform. All rights reserved.