public enum DefaultJwtTokenParser extends Enum<DefaultJwtTokenParser> implements JwtTokenParser
JwtTokenParser implementation.| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
Authentication.Builder |
parseJwt(JwtConfiguration configuration,
String jwt)
Parse given JWT and obtain it as an
Authentication instance. |
static DefaultJwtTokenParser |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DefaultJwtTokenParser[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOfgetpublic static final DefaultJwtTokenParser INSTANCE
public static DefaultJwtTokenParser[] values()
for (DefaultJwtTokenParser c : DefaultJwtTokenParser.values()) System.out.println(c);
public static DefaultJwtTokenParser valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Authentication.Builder parseJwt(JwtConfiguration configuration, String jwt) throws JwtConfiguration.InvalidJwtConfigurationException, AuthenticationException
JwtTokenParserAuthentication instance.
If the JwtConfiguration.isIncludeDetails() switch is true, the JWT claims will be included
in the Authentication instance parameter set, using the claim name as detail key.
If the JwtConfiguration.isIncludePermissions() switch is true, the default JWT claim named
AuthenticationClaims.CLAIM_NAME_PERMISSIONS, if present, is parsed to obtain the the authentication
permissions.
parseJwt in interface JwtTokenParserconfiguration - JWT configuration to use (not null)jwt - JWT value (not null)Authentication instance which represents the JWT value, if the token is valid.JwtConfiguration.InvalidJwtConfigurationException - If the JWT confguration is not validAuthenticationException - If the JWT token validation failsCopyright © 2019 The Holon Platform. All rights reserved.