Package net.shibboleth.sp.profile.impl
Class ValidateSessionInitiatorRequest
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.sp.profile.AbstractAgentRequestAction
net.shibboleth.sp.profile.AbstractAgentAction
net.shibboleth.sp.profile.AbstractApplicationAction
net.shibboleth.sp.profile.impl.ValidateSessionInitiatorRequest
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Initiating action of a typical Session Initiator flow, this validates the input message for
correctness, and may create a
RelyingPartyContext based on the identity of the
eventual authenticating authority (the IdP/OP/etc.) if this is part of the request.
The authority ID is potentially supplied by the agent in the request, or may be defaulted
based on the Application.
Since it is not always required that the ID be known in advance (e.g., discovery flows, ECP), this is confgurable to allow session initiator flows to indicate via wiring how to handle this case.
In the case that a relying party is identified but not required, requirng a discovery response URL is an error, as such a case would result in a loop.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringInitiator flow indicator for logging.private final org.slf4j.LoggerClass logger.Creation strategy forRelyingPartyContext.private StringThe relying party name to base the inbound context on.private booleanWhether to require a discovery URL input parameter.private booleanWhether to require a relying party ID to exist. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidSet initiator flow ID for logging.voidsetRelyingPartyContextCreationStrategy(Function<ProfileRequestContext, RelyingPartyContext> strategy) Set an optional lookup strategy to identify the relying party name, as a substitute for the session/logout assumptions made by the action otherwise.voidsetRequireDiscoveryURL(boolean flag) Sets whether to requireInitiatorConstants.DISCOVERY_RETURN_URLinput parameter.voidsetRequireRelyingPartyId(boolean flag) Sets whether to require that a relying party ID be available.Methods inherited from class net.shibboleth.sp.profile.AbstractApplicationAction
ensureApplication, getApplicationMethods inherited from class net.shibboleth.sp.profile.AbstractAgentAction
ensureAgent, getAgentMethods inherited from class net.shibboleth.sp.profile.AbstractAgentRequestAction
ensureAgentRequestContext, getAgentRequestContext, setAgentRequestContextLookupStrategyMethods 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. -
relyingPartyContextCreationStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextCreationStrategyCreation strategy forRelyingPartyContext. -
flowId
Initiator flow indicator for logging. -
requireRelyingPartyId
private boolean requireRelyingPartyIdWhether to require a relying party ID to exist. -
requireDiscoveryURL
private boolean requireDiscoveryURLWhether to require a discovery URL input parameter. -
relyingPartyId
The relying party name to base the inbound context on.
-
-
Constructor Details
-
ValidateSessionInitiatorRequest
public ValidateSessionInitiatorRequest()Constructor.
-
-
Method Details
-
setFlowId
Set initiator flow ID for logging.- Parameters:
id- flow ID
-
setRelyingPartyContextCreationStrategy
public void setRelyingPartyContextCreationStrategy(@Nonnull Function<ProfileRequestContext, RelyingPartyContext> strategy) Set an optional lookup strategy to identify the relying party name, as a substitute for the session/logout assumptions made by the action otherwise.- Parameters:
strategy- lookup strategy
-
setRequireRelyingPartyId
public void setRequireRelyingPartyId(boolean flag) Sets whether to require that a relying party ID be available.Defaults to true.
- Parameters:
flag- flag to set
-
setRequireDiscoveryURL
public void setRequireDiscoveryURL(boolean flag) Sets whether to requireInitiatorConstants.DISCOVERY_RETURN_URLinput parameter.- Parameters:
flag- flag to set
-
doPreExecute
- Overrides:
doPreExecutein classAbstractApplicationAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-