Class DefaultJwtAuthenticationFactory
java.lang.Object
io.micronaut.security.token.AbstractTokenAuthenticationFactory<com.nimbusds.jwt.JWT>
io.micronaut.security.token.jwt.validator.DefaultJwtAuthenticationFactory
- All Implemented Interfaces:
JwtAuthenticationFactory,TokenAuthenticationFactory<com.nimbusds.jwt.JWT>
@Singleton
public class DefaultJwtAuthenticationFactory
extends AbstractTokenAuthenticationFactory<com.nimbusds.jwt.JWT>
implements JwtAuthenticationFactory
Extracts the JWT claims and uses the
AuthenticationJWTClaimsSetAdapter to construction an Authentication object.- Since:
- 1.1.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultJwtAuthenticationFactory(TokenConfiguration tokenConfiguration, RolesFinder rolesFinder) -
Method Summary
Methods inherited from class io.micronaut.security.token.AbstractTokenAuthenticationFactory
createAuthentication, usernameForClaims
-
Constructor Details
-
DefaultJwtAuthenticationFactory
public DefaultJwtAuthenticationFactory(TokenConfiguration tokenConfiguration, RolesFinder rolesFinder) - Parameters:
tokenConfiguration- Token ConfigurationrolesFinder- Utility to retrieve roles from token claims
-
-
Method Details
-
createAuthentication
- Specified by:
createAuthenticationin interfaceJwtAuthenticationFactory- Specified by:
createAuthenticationin interfaceTokenAuthenticationFactory<com.nimbusds.jwt.JWT>- Parameters:
token- The token- Returns:
- An Authentication object.
-