Class JwtTokenValidator<T>
java.lang.Object
io.micronaut.security.token.jwt.validator.JwtTokenValidator<T>
- Type Parameters:
T- Request
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,TokenValidator<T>
@Deprecated(since="4.8.0",
forRemoval=true)
public class JwtTokenValidator<T>
extends Object
implements TokenValidator<T>
Deprecated, for removal: This API element is subject to removal in a future version.
- Since:
- 1.0
- Author:
- Sergio del Amo
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final JwtAuthenticationFactoryDeprecated, for removal: This API element is subject to removal in a future version.protected final JwtValidator<T>Deprecated, for removal: This API element is subject to removal in a future version.Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionJwtTokenValidator(JwtValidator<T> validator, JwtAuthenticationFactory jwtAuthenticationFactory) Deprecated.JwtTokenValidator(JwtValidator<T> validator, JwtAuthenticationFactory jwtAuthenticationFactory, reactor.core.scheduler.Scheduler scheduler) Deprecated, for removal: This API element is subject to removal in a future version.JwtTokenValidator(Collection<SignatureConfiguration> signatureConfigurations, Collection<EncryptionConfiguration> encryptionConfigurations, Collection<GenericJwtClaimsValidator> genericJwtClaimsValidators, JwtAuthenticationFactory jwtAuthenticationFactory) Deprecated.JwtTokenValidator(Collection<SignatureConfiguration> signatureConfigurations, Collection<EncryptionConfiguration> encryptionConfigurations, Collection<GenericJwtClaimsValidator> genericJwtClaimsValidators, JwtAuthenticationFactory jwtAuthenticationFactory, ExecutorService executorService) Deprecated, for removal: This API element is subject to removal in a future version.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<Authentication>validateToken(String token, T request) Deprecated, for removal: This API element is subject to removal in a future version.Validates the provided token and returns the authentication state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Field Details
-
jwtAuthenticationFactory
Deprecated, for removal: This API element is subject to removal in a future version. -
validator
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
JwtTokenValidator
public JwtTokenValidator(Collection<SignatureConfiguration> signatureConfigurations, Collection<EncryptionConfiguration> encryptionConfigurations, Collection<GenericJwtClaimsValidator> genericJwtClaimsValidators, JwtAuthenticationFactory jwtAuthenticationFactory, @Named("blocking") ExecutorService executorService) Deprecated, for removal: This API element is subject to removal in a future version.Constructor.- Parameters:
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.executorService- Executor Service
-
JwtTokenValidator
@Deprecated public JwtTokenValidator(Collection<SignatureConfiguration> signatureConfigurations, Collection<EncryptionConfiguration> encryptionConfigurations, Collection<GenericJwtClaimsValidator> genericJwtClaimsValidators, JwtAuthenticationFactory jwtAuthenticationFactory) Deprecated.Constructor.- Parameters:
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.
-
JwtTokenValidator
@Deprecated public JwtTokenValidator(JwtValidator<T> validator, JwtAuthenticationFactory jwtAuthenticationFactory) Deprecated.- Parameters:
validator- Validates the JWTjwtAuthenticationFactory- The authentication factory
-
JwtTokenValidator
public JwtTokenValidator(JwtValidator<T> validator, JwtAuthenticationFactory jwtAuthenticationFactory, reactor.core.scheduler.Scheduler scheduler) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
validator- Validates the JWTjwtAuthenticationFactory- The authentication factoryscheduler- The scheduler to use
-
-
Method Details
-
validateToken
public org.reactivestreams.Publisher<Authentication> validateToken(String token, @Nullable T request) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:TokenValidatorValidates the provided token and returns the authentication state.- Specified by:
validateTokenin interfaceTokenValidator<T>- Parameters:
token- The token string.request- The current request (or null)- Returns:
- Publishes
Authenticationbased on the JWT or empty if the validation fails.
-
ReactiveJsonWebTokenValidatorinstead.