Uses of Interface
org.forgerock.openig.tools.jwt.validation.JwtClaimConstraint
Packages that use JwtClaimConstraint
Package
Description
This package contains classes used to perform JWT validation.
-
Uses of JwtClaimConstraint in org.forgerock.openig.tools.jwt.validation
Methods in org.forgerock.openig.tools.jwt.validation that return JwtClaimConstraintModifier and TypeMethodDescriptionstatic <T> JwtClaimConstraint<Collection<T>>Constraints.contains(T expected) Returnsemptyif the list contains the expected value.static <T> JwtClaimConstraint<Collection<T>>Constraints.containsOnly(T expected) Returnsemptyif the list contains only the expected value.static <T> JwtClaimConstraint<T>Constraints.equalsAttributeUsingKey()Returns aJwtClaimConstraintthat will succeed if the expected value is equal to the value looked up in the context attributes using the key, otherwise it will fail.static <T> JwtClaimConstraint<T>Constraints.isEqualTo(T expected) Returnsemptyif the value is equal to the one expected and fulfill theViolationwith the custom error message.static <T> JwtClaimConstraint<T>Constraints.isExpectedType(Class<?> expectedType) Returns aJwtClaimConstraintthat will succeed if the claim exists and is of the expected type, otherwise it will fail.static <T extends Comparable<T>>
JwtClaimConstraint<T>Constraints.isGreaterOrEqualTo(Function<ValidatorConstraintContext, T> limitSupplier) Returns aJwtClaimConstraintthat will succeed if the value is greater than or equal to the given value, otherwise it will fail.static <T extends Comparable<T>>
JwtClaimConstraint<T>Constraints.isGreaterOrEqualTo(T limit) A shorter version of isGreaterOrEqualTo(constant(limit)).static <T extends Comparable<T>>
JwtClaimConstraint<T>Constraints.isGreaterThan(Function<ValidatorConstraintContext, T> limitSupplier) Returns aJwtClaimConstraintthat will succeed if the value is greater than the given value, otherwise it will fail.static <T extends Comparable<T>>
JwtClaimConstraint<T>Constraints.isGreaterThan(T limit) A shorter version of isGreaterThan(constant(limit)).static JwtClaimConstraint<Instant>Constraints.isInTheFuture()Returns aJwtClaimConstraintthat will succeed if the timestamp is after the given date, otherwise it will fail.static JwtClaimConstraint<Instant>Constraints.isInThePast()Returns aJwtClaimConstraintthat will succeed if the timestamp is before the given date, otherwise it will fail.static <T extends Comparable<T>>
JwtClaimConstraint<T>Constraints.isLessOrEqualTo(Function<ValidatorConstraintContext, T> limitSupplier) Returns aJwtClaimConstraintthat will succeed if the value is less than or equal to the given value, otherwise it will fail.static <T extends Comparable<T>>
JwtClaimConstraint<T>Constraints.isLessOrEqualTo(T limit) A shorter version of isLessOrEqualTo(constant(limit)).static <T extends Comparable<T>>
JwtClaimConstraint<T>Constraints.isLessThan(Function<ValidatorConstraintContext, T> limitSupplier) Returns aJwtClaimConstraintthat will succeed if the value is less than the given value, otherwise it will fail.static <T extends Comparable<T>>
JwtClaimConstraint<T>Constraints.isLessThan(T limit) A shorter version of isLessThan(constant(limit)).static JwtClaimConstraint<JsonValue>Constraints.isNotNull()Returnsemptyif the value is present.static JwtClaimConstraint<String>Build and returns a new `Constraint` that checks if the claim's value is matched (as perMatcher.matches()) by the givenregex.Methods in org.forgerock.openig.tools.jwt.validation with parameters of type JwtClaimConstraintModifier and TypeMethodDescriptionJwtValidator.Builder.claim(String key, JwtClaimConstraint<JsonValue> jwtClaimConstraint) Adds aJwtClaimConstrainton a claim.<T,E extends Exception>
JwtValidator.BuilderJwtValidator.Builder.claim(String key, Function<JsonValue, ? extends T, E> transformer, JwtClaimConstraint<T> jwtClaimConstraint) Adds aJwtClaimConstrainton a claim.JwtValidator.Builder.claims(String key, JwtClaimConstraint<String> jwtClaimConstraint) Adds aJwtClaimConstrainton a claim.JwtValidator.Builder.claimSet(String key, Function<Optional<JwtClaimsSet>, Optional<T>> adapter, JwtClaimConstraint<T> jwtClaimConstraint) Deprecated.since 2024.3.0, with OPENIG-8029.JwtValidator.Builder.claimSet(String key, Function<Optional<JwtClaimsSet>, Optional<T>> adapter, JwtClaimConstraint<T> jwtClaimConstraint, boolean optional) Adds aJwtClaimConstrainton the claimSet.JwtValidator.Builder.optionalClaim(String key, JwtClaimConstraint<JsonValue> jwtClaimConstraint) Adds aJsonValuebasedJwtClaimConstrainton an optional claim.<T,E extends Exception>
JwtValidator.BuilderJwtValidator.Builder.optionalClaim(String key, Function<JsonValue, ? extends T, E> transformer, JwtClaimConstraint<T> jwtClaimConstraint) Adds aJwtClaimConstrainton an optional claim.JwtValidator.Builder.optionalClaims(String key, JwtClaimConstraint<String> jwtClaimConstraint) Adds aStringbasedJwtClaimConstrainton an optional claim.