Class NotBeforeJwtClaimsValidator<T>

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

@Singleton @Requires(property="micronaut.security.token.jwt.claims-validators.not-before", value="true") public class NotBeforeJwtClaimsValidator<T> extends Object implements GenericJwtClaimsValidator<T>
Validate current time is not before the not-before claim of a JWT token.
Since:
2.4.0
Author:
Jason Schindler, Sergio del Amo
  • Field Details

  • Constructor Details

    • NotBeforeJwtClaimsValidator

      public NotBeforeJwtClaimsValidator()
  • Method Details

    • validate

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

      public boolean validate(@NonNull @NonNull Claims claims, @Nullable T request)
      Specified by:
      validate in interface JwtClaimsValidator<T>
      Parameters:
      claims - The JwtClaims
      request - HTTP Request
      Returns:
      true if the not-before claim denotes a date before now