Class JwtValidator
java.lang.Object
org.forgerock.openig.tools.jwt.validation.JwtValidator
The
JwtValidator is responsible for the JWT validation. Constraints could be applied using
the Builder to several claims in order to verify the claim's value (expiration, presence, etc.).
The JwtValidator is stateless and immutable therefore, it can be reused to apply the same set
of constraints to another Jwt.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic JwtValidator.BuilderBuilder for the JwtValidator with a clock to use for temporal constraints.Returns the result of the JWT validation and a list of any violations.Returns the result of the JWT validation and a list of any violations.
-
Method Details
-
report
Returns the result of the JWT validation and a list of any violations.- Parameters:
jwt- The given JWT to analyze.- Returns:
- Promise of a
JwtValidatorResultcontaining the list of anyViolations.
-
report
Returns the result of the JWT validation and a list of any violations.- Parameters:
jwt- The given JWT to analyze.attributes-Mapof additional context attributes.- Returns:
- Promise of a
JwtValidatorResultcontaining the list of anyViolations.
-
builder
Builder for the JwtValidator with a clock to use for temporal constraints.- Parameters:
clock- The clock to use for temporal constraints- Returns:
- a builder.
-