Class ValidatePKCE
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCResponseAction
net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidatePKCE
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
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 Summary
FieldsModifier and TypeFieldDescriptionprivate Predicate<ProfileRequestContext>Strategy used to determine whether to allow plaintext PKCE.private StringPKCE code challenge.private StringPKCE code verifier.private Function<ProfileRequestContext,String> Strategy used to locate the PKCE Code Verifier value.private booleanWhether PKCE is mandatory.private Predicate<ProfileRequestContext>Strategy used to determine whether to require PKCE.private org.slf4j.LoggerClass logger.private booleanWhether plain PKCE is allowed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidsetAllowPKCEPlainCondition(Predicate<ProfileRequestContext> condition) Set the condition used to determine whether to allow plaintext PKCE.voidSet the strategy used to locate the Code Verifier value.voidsetForcePKCECondition(Predicate<ProfileRequestContext> condition) Set the condition used to determine whether to require PKCE.Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCResponseAction
getMetadataContext, getOidcResponseContextMethods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private org.slf4j.Logger logClass logger. -
codeVerifierLookupStrategy
Strategy used to locate the PKCE Code Verifier value. -
forcePKCECondition
Strategy used to determine whether to require PKCE. -
allowPKCEPlainCondition
Strategy used to determine whether to allow plaintext PKCE. -
forcePKCE
private boolean forcePKCEWhether PKCE is mandatory. -
plainPKCE
private boolean plainPKCEWhether plain PKCE is allowed. -
codeChallenge
PKCE code challenge. -
codeVerifier
PKCE code verifier.
-
-
Constructor Details
-
ValidatePKCE
public ValidatePKCE()Constructor.
-
-
Method Details
-
setForcePKCECondition
Set the condition used to determine whether to require PKCE.- Parameters:
condition- condition to apply
-
setAllowPKCEPlainCondition
Set the condition used to determine whether to allow plaintext PKCE.- Parameters:
condition- condition to apply
-
setCodeVerifierLookupStrategy
Set the strategy used to locate the Code Verifier value.- Parameters:
strategy- strategy used to locate the Code Verifier value
-
doPreExecute
- Overrides:
doPreExecutein classAbstractOIDCResponseAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-