Class ValidateCodeChallenge
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.AbstractOIDCRequestAction<AuthorizationRequest>
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractOAuthAuthorizationRequestAction
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractOAuthAuthorizationResponseAction
net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.ValidateCodeChallenge
- 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
Validates the presence of PKCE code challenge parameter from the incoming authentication request.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Predicate<ProfileRequestContext>Strategy used to determine whether to allow plaintext PKCE.private StringPKCE code challenge.private Function<ProfileRequestContext,String> Strategy used to locate the code challenge.private StringPKCE code challenge method.private Function<ProfileRequestContext,String> Strategy used to locate the code challenge method.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 voidprotected 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 Challenge of the request.voidSet the strategy used to locate the Code Challenge Method of the request.voidsetForcePKCECondition(Predicate<ProfileRequestContext> condition) Set the condition used to determine whether to require PKCE.Methods inherited from class net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractOAuthAuthorizationResponseAction
getMetadataContext, getOidcResponseContextMethods inherited from class net.shibboleth.idp.plugin.oidc.op.oauth2.profile.impl.AbstractOAuthAuthorizationRequestAction
getAuthorizationRequestMethods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCRequestAction
getRequestMethods 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, 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. -
forcePKCECondition
Strategy used to determine whether to require PKCE. -
allowPKCEPlainCondition
Strategy used to determine whether to allow plaintext PKCE. -
codeChallengeLookupStrategy
Strategy used to locate the code challenge. -
codeChallengeMethodLookupStrategy
Strategy used to locate the code challenge method. -
forcePKCE
private boolean forcePKCEWhether PKCE is mandatory. -
plainPKCE
private boolean plainPKCEWhether plain PKCE is allowed. -
codeChallenge
PKCE code challenge. -
codeChallengeMethod
PKCE code challenge method.
-
-
Constructor Details
-
ValidateCodeChallenge
public ValidateCodeChallenge()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
-
setCodeChallengeLookupStrategy
public void setCodeChallengeLookupStrategy(@Nonnull Function<ProfileRequestContext, String> strategy) Set the strategy used to locate the Code Challenge of the request.- Parameters:
strategy- lookup strategy
-
setCodeChallengeMethodLookupStrategy
public void setCodeChallengeMethodLookupStrategy(@Nonnull Function<ProfileRequestContext, String> strategy) Set the strategy used to locate the Code Challenge Method of the request.- Parameters:
strategy- lookup strategy
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractOAuthAuthorizationResponseAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-