Interface JwtClaimConstraint<T>

  • Type Parameters:
    T - The claim value type.
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface JwtClaimConstraint<T>
    A JwtClaimConstraint represents an individual check that can applied to test a claim from a JWT.
    • Method Detail

      • apply

        Promise<Result,​NeverThrowsException> apply​(ValidatorConstraintContext constraintContext,
                                                         String key,
                                                         T value)
        Apply a constraint to the given claim value.
        Parameters:
        constraintContext - The validation context used to hold data between constraints validation
        key - The claim's key.
        value - The value on which to apply the JwtClaimConstraint.
        Returns:
        a Result promise for this JwtClaimConstraint.