Class ExtractClientAuthenticationFromRequest
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.authn.AbstractAuthenticationAction
net.shibboleth.idp.authn.AbstractExtractionAction
net.shibboleth.idp.plugin.oidc.op.authn.impl.ExtractClientAuthenticationFromRequest
- 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
Extracts OAuth 2 client authentication details from a request and stores them in an
OAuth2ClientAuthenticationContext beneath the AuthenticationContext for subsequent
validation.
Depending on the form of authentication, additional child contexts may be created to store
extracted credentials, and they may undergo configured transformations. For example, password-based
methods will result in a UsernamePasswordContext, certificate-based in an CertificateContext,
etc.
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_MSG_CTX,AuthnEventIds.NO_CREDENTIALS- Precondition:
- ProfileRequestContext.getSubcontext(AuthenticationContext.class) != null
- Postcondition:
- AuthenticationContext.getSubcontext(OAuth2ClientAuthenticationContext.class) ! null along with other contexts as appropriate
-
Field Summary
FieldsModifier and TypeFieldDescriptionLookup strategy for enabled client authentication methods.private final org.slf4j.LoggerClass logger.Message to extract credentials from. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext) voidsetClientAuthMethodsLookupStrategy(Function<ProfileRequestContext, Set<ClientAuthenticationMethod>> strategy) Set the lookup strategy for enabled client authentication methods.Methods inherited from class net.shibboleth.idp.authn.AbstractExtractionAction
applyTransforms, setLowercase, setTransforms, setTrim, setUppercaseMethods inherited from class net.shibboleth.idp.authn.AbstractAuthenticationAction
doExecute, doPreExecute, setAuthenticationContextLookupStrategyMethods 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 final org.slf4j.Logger logClass logger. -
clientAuthMethodsLookupStrategy
@NonnullAfterInit private Function<ProfileRequestContext,Set<ClientAuthenticationMethod>> clientAuthMethodsLookupStrategyLookup strategy for enabled client authentication methods. -
request
Message to extract credentials from.
-
-
Constructor Details
-
ExtractClientAuthenticationFromRequest
public ExtractClientAuthenticationFromRequest()Constructor.
-
-
Method Details
-
setClientAuthMethodsLookupStrategy
public void setClientAuthMethodsLookupStrategy(@Nonnull Function<ProfileRequestContext, Set<ClientAuthenticationMethod>> strategy) Set the lookup strategy for enabled client authentication methods.- Parameters:
strategy- What to set.
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext) - Overrides:
doPreExecutein classAbstractAuthenticationAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext) - Overrides:
doExecutein classAbstractAuthenticationAction
-