Class ValidateCodeChallenge
- java.lang.Object
-
- net.shibboleth.utilities.java.support.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<com.nimbusds.openid.connect.sdk.AuthenticationRequest>
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCAuthenticationRequestAction
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCAuthenticationResponseAction
-
- net.shibboleth.idp.plugin.oidc.op.profile.impl.ValidateCodeChallenge
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class ValidateCodeChallenge extends AbstractOIDCAuthenticationResponseAction
Validates the presence of PKCE code challenge parameter from the incoming authentication request.
-
-
Field Summary
Fields Modifier and Type Field Description private Predicate<ProfileRequestContext>allowPKCEPlainConditionStrategy used to determine whether to allow plaintext PKCE.private StringcodeChallengePKCE code challenge.private Function<ProfileRequestContext,String>codeChallengeLookupStrategyStrategy used to locate the code challenge.private StringcodeChallengeMethodPKCE code challenge method.private Function<ProfileRequestContext,String>codeChallengeMethodLookupStrategyStrategy used to locate the code challenge method.private booleanforcePKCEWhether PKCE is mandatory.private Predicate<ProfileRequestContext>forcePKCEConditionStrategy used to determine whether to require PKCE.private org.slf4j.LoggerlogClass logger.private booleanplainPKCEWhether plain PKCE is allowed.
-
Constructor Summary
Constructors Constructor Description ValidateCodeChallenge()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected booleandoPreExecute(ProfileRequestContext profileRequestContext)voidsetAllowPKCEPlainCondition(Predicate<ProfileRequestContext> condition)Set the condition used to determine whether to allow plaintext PKCE.voidsetCodeChallengeLookupStrategy(Function<ProfileRequestContext,String> strategy)Set the strategy used to locate the Code Challenge of the request.voidsetCodeChallengeMethodLookupStrategy(Function<ProfileRequestContext,String> strategy)Set 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.profile.impl.AbstractOIDCAuthenticationResponseAction
getMetadataContext, getOidcResponseContext
-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCAuthenticationRequestAction
getAuthenticationRequest
-
Methods inherited from class net.shibboleth.idp.plugin.oidc.op.profile.impl.AbstractOIDCRequestAction
getRequest
-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private org.slf4j.Logger log
Class logger.
-
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.
-
codeChallengeLookupStrategy
@Nonnull private Function<ProfileRequestContext,String> codeChallengeLookupStrategy
Strategy used to locate the code challenge.
-
codeChallengeMethodLookupStrategy
@Nonnull private Function<ProfileRequestContext,String> codeChallengeMethodLookupStrategy
Strategy used to locate the code challenge method.
-
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.
-
codeChallengeMethod
@Nullable private String codeChallengeMethod
PKCE code challenge method.
-
-
Method Detail
-
setForcePKCECondition
public void setForcePKCECondition(@Nonnull Predicate<ProfileRequestContext> condition)Set the condition used to determine whether to require PKCE.- Parameters:
condition- condition to apply
-
setAllowPKCEPlainCondition
public void setAllowPKCEPlainCondition(@Nonnull Predicate<ProfileRequestContext> condition)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
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractOIDCAuthenticationResponseAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-