@Singleton public class JwtTokenValidator extends java.lang.Object implements TokenValidator
Modifier and Type | Field and Description |
---|---|
protected JwtAuthenticationFactory |
jwtAuthenticationFactory |
protected JwtValidator |
validator |
Constructor and Description |
---|
JwtTokenValidator(java.util.Collection<SignatureConfiguration> signatureConfigurations,
java.util.Collection<EncryptionConfiguration> encryptionConfigurations,
java.util.Collection<GenericJwtClaimsValidator> genericJwtClaimsValidators,
JwtAuthenticationFactory jwtAuthenticationFactory)
Constructor.
|
JwtTokenValidator(JwtValidator validator,
JwtAuthenticationFactory jwtAuthenticationFactory) |
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Publisher<Authentication> |
validateToken(java.lang.String token)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validateToken
protected final JwtAuthenticationFactory jwtAuthenticationFactory
protected final JwtValidator validator
@Inject public JwtTokenValidator(java.util.Collection<SignatureConfiguration> signatureConfigurations, java.util.Collection<EncryptionConfiguration> encryptionConfigurations, java.util.Collection<GenericJwtClaimsValidator> genericJwtClaimsValidators, JwtAuthenticationFactory jwtAuthenticationFactory)
signatureConfigurations
- List of Signature configurations which are used to attempt validation.encryptionConfigurations
- List of Encryption configurations which are used to attempt validation.genericJwtClaimsValidators
- Generic JWT Claims validators which should be used to validate any JWT.jwtAuthenticationFactory
- Utility to generate an Authentication given a JWT.public JwtTokenValidator(JwtValidator validator, JwtAuthenticationFactory jwtAuthenticationFactory)
validator
- Validates the JWTjwtAuthenticationFactory
- The authentication factory@Deprecated public org.reactivestreams.Publisher<Authentication> validateToken(java.lang.String token)
TokenValidator.validateToken(String, io.micronaut.http.HttpRequest)
instead.TokenValidator
validateToken
in interface TokenValidator
token
- The token string.Authentication
based on the JWT or empty if the validation fails.