Class ChainingJWTClaimsValidator

All Implemented Interfaces:
ClaimsValidator, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent

@ThreadSafeAfterInit public class ChainingJWTClaimsValidator extends AbstractIdentifiableInitializableComponent implements ClaimsValidator
A ClaimsValidator implementation that validates a JWT claims set from a chain of configured validators.

Normally, validation terminates when one of the validators throws a JWTValidationException. If no JWTValidationException is thrown, the claims set is 'valid'.

Optionally this can be toggled such that any of the validators succeeeding implies overall success.

Note, does not represent a chain of responsibility pattern despite the name.

  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • claimValidators

      List of claim validators. Ordering is not important.
    • requireAll

      private boolean requireAll
      Require all of the validators to be successful.
  • Constructor Details

    • ChainingJWTClaimsValidator

      public ChainingJWTClaimsValidator()
      Constructor.
  • Method Details