Class JwtValidator<T>
java.lang.Object
io.micronaut.security.token.jwt.validator.JwtValidator<T>
- Type Parameters:
T
- Request
Deprecated, for removal: This API element is subject to removal in a future version.
A builder style class for validating JWT tokens against any number of provided
encryption or signature configurations and any claim validators.
- Since:
- 1.4.0
- Author:
- James Kleeh
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Deprecated, for removal: This API element is subject to removal in a future version.A builder forJwtValidator
. -
Method Summary
Modifier and TypeMethodDescriptionstatic JwtValidator.Builder
builder()
Deprecated, for removal: This API element is subject to removal in a future version.Optional<com.nimbusds.jwt.JWT>
Deprecated, for removal: This API element is subject to removal in a future version.Validates the supplied token with any configurations and claim validators present.Optional<com.nimbusds.jwt.JWT>
Deprecated, for removal: This API element is subject to removal in a future version.Validates the supplied token with any configurations and claim validators present.
-
Method Details
-
validate
Deprecated, for removal: This API element is subject to removal in a future version.Validates the supplied token with any configurations and claim validators present.- Parameters:
token
- The JWT stringrequest
- HTTP Request- Returns:
- An optional JWT token if validation succeeds
-
validate
public Optional<com.nimbusds.jwt.JWT> validate(@NonNull @NonNull com.nimbusds.jwt.JWT token, @Nullable T request) Deprecated, for removal: This API element is subject to removal in a future version.Validates the supplied token with any configurations and claim validators present.- Parameters:
token
- The JWT tokenrequest
- The HTTP Request which contained the JWT token- Returns:
- An optional JWT token if validation succeeds
-
builder
Deprecated, for removal: This API element is subject to removal in a future version.- Returns:
- A new JWT validator builder
-
JsonWebTokenValidator
orReactiveJsonWebTokenValidator
instead.