Class JwtValidator<T>

java.lang.Object
io.micronaut.security.token.jwt.validator.JwtValidator<T>
Type Parameters:
T - Request

@Deprecated(since="4.8.0", forRemoval=true) public final class JwtValidator<T> extends Object
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

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    A builder for JwtValidator.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Optional<com.nimbusds.jwt.JWT>
    validate(@NonNull com.nimbusds.jwt.JWT token, 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.
    Optional<com.nimbusds.jwt.JWT>
    validate(String token, 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • validate

      public Optional<com.nimbusds.jwt.JWT> validate(String 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 string
      request - 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 token
      request - The HTTP Request which contained the JWT token
      Returns:
      An optional JWT token if validation succeeds
    • builder

      public static JwtValidator.Builder builder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      A new JWT validator builder