Class AbstractTokenConsumerResponseAction
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
This class operates on the principle that most of the output of a consumer flow
consists of an AttributeContext containing the data making up the results
together with opaque data that accompanies the results in order to allow the agent
to store and return any protocol-specific data needed for subsequent operations,
primarily logout.
Subclasses are responsible for carrying out certain tasks that will be protocol- specific, such as accessing protocol state needed to recover the original resource.
The agent response will generally contain an HTTP response structure capturing a redirect to the recovered URL, the serialized attribute data, and the opaque session data.
If the response is "committed" prior to this action, then the redirect portion will be skipped in favor of the previous response.
- Event:
EventIds.PROCEED_EVENT_ID- Precondition:
AgentRequestContext.getOutput().isstruct()
,AgentRequestContext.getRemotedServletResponse() != null
-
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy used to locateAttributeContextwith results.private org.slf4j.LoggerClass logger.Strategy used to locate theStateDataContextto pull target from. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext) protected abstract DDFgetSessionData(ProfileRequestContext profileRequestContext) Get the opaque session data that the agent should bind to any session it creates for later use.protected InstantgetSessionNotOnOrAfter(ProfileRequestContext profileRequestContext) Get a timestamp for the expiration of the session directed by the authentication token, if any.voidSet the strategy used to locate theAttributeContextwith the results.voidSets the strategy used to lookup theStateDataContext.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 org.slf4j.Logger logClass logger. -
attributeContextLookupStrategy
Strategy used to locateAttributeContextwith results. -
stateDataContextLookupStrategy
Strategy used to locate theStateDataContextto pull target from.
-
-
Constructor Details
-
AbstractTokenConsumerResponseAction
public AbstractTokenConsumerResponseAction()Constructor.
-
-
Method Details
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<ProfileRequestContext, AttributeContext> strategy) Set the strategy used to locate theAttributeContextwith the results.- Parameters:
strategy- lookup strategy
-
setStateDataContextLookupStrategy
public void setStateDataContextLookupStrategy(@Nonnull Function<ProfileRequestContext, StateDataContext> strategy) Sets the strategy used to lookup theStateDataContext.- Parameters:
strategy- lookup strategy
-
doPreExecute
- Overrides:
doPreExecutein classAbstractApplicationAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
getSessionData
@Nullable protected abstract DDF getSessionData(@Nonnull ProfileRequestContext profileRequestContext) Get the opaque session data that the agent should bind to any session it creates for later use.- Parameters:
profileRequestContext- profile request context- Returns:
- opaque session data as a
DDFnode, or null if no session data is provided
-
getSessionNotOnOrAfter
@Nullable protected Instant getSessionNotOnOrAfter(@Nonnull ProfileRequestContext profileRequestContext) Get a timestamp for the expiration of the session directed by the authentication token, if any.- Parameters:
profileRequestContext- profile request context- Returns:
- session expiration time or null
-