Class NotBeforeClaimsValidator

All Implemented Interfaces:
ClaimsValidator, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent

@ThreadSafeAfterInit public class NotBeforeClaimsValidator extends AbstractClaimsValidator
Iff a not-before-time (nbf) claim is present, makes sure it is before the current time. RFC7519 section 4.1.5.
  • Field Details

    • clockSkew

      @Nonnull private Duration clockSkew
      Positive clock skew adjustment to consider when checking JWT not before and expiration (Default value: 60 seconds).
  • Constructor Details

    • NotBeforeClaimsValidator

      public NotBeforeClaimsValidator()
      Constructor.
  • Method Details

    • setClockSkew

      public void setClockSkew(@Nonnull Duration skew)
      Set the clock skew.
      Parameters:
      skew - clock skew to set
    • doValidate

      public void doValidate(@Nonnull com.nimbusds.jwt.JWTClaimsSet claims, @Nonnull ProfileRequestContext context) throws JWTValidationException
      Perform validation of the given claims supported by the supplied context.
      Specified by:
      doValidate in class AbstractClaimsValidator
      Parameters:
      claims - the claims to validate.
      context - the profile request context.
      Throws:
      JWTValidationException - when validation is unsuccessful due to a failed attempt