Class ExpirationJwtClaimsValidator<T>

java.lang.Object
io.micronaut.security.token.jwt.validator.ExpirationJwtClaimsValidator<T>
Type Parameters:
T - Request
All Implemented Interfaces:
GenericJwtClaimsValidator<T>, JwtClaimsValidator<T>

@Singleton @Requires(property="micronaut.security.token.jwt.claims-validators.expiration", notEquals="false") public class ExpirationJwtClaimsValidator<T> extends Object implements GenericJwtClaimsValidator<T>
Validate JWT is not expired.
Since:
1.1.0
Author:
Sergio del Amo
  • Constructor Details

    • ExpirationJwtClaimsValidator

      public ExpirationJwtClaimsValidator()
  • Method Details

    • validate

      protected boolean validate(@NonNull @NonNull com.nimbusds.jwt.JWTClaimsSet claimsSet)
      Parameters:
      claimsSet - The JWT Claims
      Returns:
      true if the expiration claim denotes a date after now.
    • validate

      public boolean validate(@NonNull @NonNull Claims claims, @Nullable T request)
      Specified by:
      validate in interface JwtClaimsValidator<T>
      Parameters:
      claims - JWT Claims
      request - HTTP request
      Returns:
      whether the JWT claims pass validation.