Package org.forgerock.openig.tools.jwt
Class ValidatorConstraintContext
- java.lang.Object
-
- org.forgerock.openig.tools.jwt.ValidatorConstraintContext
-
public class ValidatorConstraintContext extends Object
The validation context that will be passed among the different JWT constraints validations.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getAttribute(String key)
Get an attribute from theJwtValidationContext
by key.Instant
getCurrentDateTime()
Returns the current instant that was captured when the validation started.Jwt
getJwt()
Return the JWT the constraints must be applied on.TemporalAmount
getSkewAllowance()
Returns the skew allowance that can be tolerated when validating temporal fields.
-
-
-
Method Detail
-
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 theJwtValidationContext
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.
-
-