@Singleton public class DefaultJwtAuthenticationFactory extends java.lang.Object implements JwtAuthenticationFactory
AuthenticationJWTClaimsSetAdapter to construction an Authentication object.| Constructor and Description |
|---|
DefaultJwtAuthenticationFactory(TokenConfiguration tokenConfiguration,
RolesFinder rolesFinder) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<Authentication> |
createAuthentication(com.nimbusds.jwt.JWT token) |
protected java.util.Optional<java.lang.String> |
usernameForClaims(com.nimbusds.jwt.JWTClaimsSet claimSet) |
public DefaultJwtAuthenticationFactory(TokenConfiguration tokenConfiguration, RolesFinder rolesFinder)
public java.util.Optional<Authentication> createAuthentication(com.nimbusds.jwt.JWT token)
createAuthentication in interface JwtAuthenticationFactorycreateAuthentication in interface TokenAuthenticationFactory<com.nimbusds.jwt.JWT>token - The tokenprotected java.util.Optional<java.lang.String> usernameForClaims(com.nimbusds.jwt.JWTClaimsSet claimSet)
throws java.text.ParseException
claimSet - JWT ClaimsTokenConfiguration.getNameKey() ()} or the sub claim.java.text.ParseException - might be thrown parsing claims