Class NumberOfClaimValuesActivationCondition

java.lang.Object
net.shibboleth.oidc.security.jwt.claims.impl.NumberOfClaimValuesActivationCondition
All Implemented Interfaces:
BiPredicate<ProfileRequestContext,JWTClaimsSet>

@ThreadSafe public class NumberOfClaimValuesActivationCondition extends Object implements BiPredicate<ProfileRequestContext,JWTClaimsSet>
Activation condition to check the number of values a claim has against a given predicate.

A claim that does not exist will still be tested with a size of 0.

A claim that exists but not as a list will be assumed to have a single value (size = 1).

  • Field Details

    • claimToCheck

      @Nonnull @NotEmpty private final String claimToCheck
      The name of the claim to check exists in the claims set.
    • numberOfValuesPredicate

      @Nonnull private final IntPredicate numberOfValuesPredicate
      The predicate used to determine if the claim has the correct number of values.
  • Constructor Details

    • NumberOfClaimValuesActivationCondition

      public NumberOfClaimValuesActivationCondition(@Nonnull @NotEmpty @ParameterName(name="claimToCheck") String claimName, @Nonnull @ParameterName(name="numberOfValuesPredicate") IntPredicate predicate)
      Constructor.
      Parameters:
      claimName - the name of the claim to check exists in the claims set.
      predicate - the predicate used to determine if the claim has the correct number of values.
  • Method Details