All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, org.springframework.beans.factory.Aware, org.springframework.context.MessageSource, org.springframework.context.MessageSourceAware, org.springframework.webflow.execution.Action

public class ValidatePKCE extends AbstractOIDCResponseAction
Action performs PKCE (https://oauth.net/2/pkce/) validation. If authentication request contains code_challenge parameter, token request when passing authorization code as grant must include code_verifier parameter. Profile configuration may used to force using PKCE, by default it is optional. Profile configuration may be used to allow plain PKCE, by default it is not allowed.
  • Field Details

    • log

      @Nonnull private org.slf4j.Logger log
      Class logger.
    • codeVerifierLookupStrategy

      @Nonnull private Function<ProfileRequestContext,String> codeVerifierLookupStrategy
      Strategy used to locate the PKCE Code Verifier value.
    • forcePKCECondition

      @Nonnull private Predicate<ProfileRequestContext> forcePKCECondition
      Strategy used to determine whether to require PKCE.
    • allowPKCEPlainCondition

      @Nonnull private Predicate<ProfileRequestContext> allowPKCEPlainCondition
      Strategy used to determine whether to allow plaintext PKCE.
    • forcePKCE

      private boolean forcePKCE
      Whether PKCE is mandatory.
    • plainPKCE

      private boolean plainPKCE
      Whether plain PKCE is allowed.
    • codeChallenge

      @Nullable private String codeChallenge
      PKCE code challenge.
    • codeVerifier

      @Nullable private String codeVerifier
      PKCE code verifier.
  • Constructor Details

    • ValidatePKCE

      public ValidatePKCE()
      Constructor.
  • Method Details