Class NotBeforeJwtClaimsValidator

java.lang.Object
io.micronaut.security.token.jwt.validator.NotBeforeJwtClaimsValidator
All Implemented Interfaces:
GenericJwtClaimsValidator, JwtClaimsValidator

@Singleton @Requires(property="micronaut.security.token.jwt.claims-validators.not-before", value="true") public class NotBeforeJwtClaimsValidator extends Object implements GenericJwtClaimsValidator
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 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 JwtClaims claims, @Nullable io.micronaut.http.HttpRequest<?> request)
      Specified by:
      validate in interface JwtClaimsValidator
      Parameters:
      claims - The JwtClaims
      request - HTTP Request
      Returns:
      true if the not-before claim denotes a date before now