Class ValidatorConstraintContext

java.lang.Object
org.forgerock.openig.tools.jwt.validation.ValidatorConstraintContext

public class ValidatorConstraintContext extends Object
The validation context that will be passed among the different JWT constraints validations.
  • Method Details

    • getCurrentDateTime

      public Instant getCurrentDateTime()
      Returns the current instant that was captured when the validation started.
      Returns:
      the current instant that was captured when the validation started.
    • getSkewAllowance

      public TemporalAmount getSkewAllowance()
      Returns the skew allowance that can be tolerated when validating temporal fields.
      Returns:
      the skew allowance that can be tolerated when validating temporal fields.
    • getAttribute

      public <T> T getAttribute(String key)
      Get an attribute from the JwtValidationContext by key.
      Type Parameters:
      T - the expected attribute type
      Parameters:
      key - the key to use to retrieve the attribute
      Returns:
      the attribute
    • getJwt

      public Jwt getJwt()
      Return the JWT the constraints must be applied on.
      Returns:
      the JWT the constraints must be applied on.