Package net.shibboleth.idp.session.impl

# Class SaveLogoutContext

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.session.impl.SaveLogoutContext

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`, `Aware`, `MessageSource`, `MessageSourceAware`, `Action`

public class SaveLogoutContext extends AbstractProfileAction
Stores the `LogoutContext` in the servlet session to facilitate lookup by logout propagation flows.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`static final String`
`LOGOUT_CONTEXT_KEY`
Key name under which LogoutContext is stored in Session.
`private Function<ProfileRequestContext,LogoutContext>`
`logoutContextLookup`
Looks up a LogoutContext from PRC.

## Constructor Summary

Constructors
Constructor
Description
`SaveLogoutContext()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected Event`
`doExecute(RequestContext springRequestContext, ProfileRequestContext profileRequestContext)`
Spring-aware actions can override this method to fully control the execution of an Action by the Web Flow engine.
`void`
`setLogoutContextLookupStrategy(Function<ProfileRequestContext,LogoutContext> strategy)`
Set the lookup strategy for the `LogoutContext`.

### Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction

`execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy`

### Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

`doPreExecute, getActivationCondition, setActivationCondition`

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doExecute, doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, 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.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### LOGOUT_CONTEXT_KEY

@Nonnull @NotEmpty public static final String LOGOUT_CONTEXT_KEY
Key name under which LogoutContext is stored in Session.

See Also:
  - Constant Field Values

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### logoutContextLookup

@Nonnull private Function<ProfileRequestContext,LogoutContext> logoutContextLookup
Looks up a LogoutContext from PRC.

## Constructor Details

### SaveLogoutContext

public SaveLogoutContext()
Constructor.

## Method Details

### setLogoutContextLookupStrategy

public void setLogoutContextLookupStrategy(@Nonnull Function<ProfileRequestContext,LogoutContext> strategy)
Set the lookup strategy for the `LogoutContext`.

Parameters:
  `strategy` - lookup strategy

### doExecute

@Nullable protected Event doExecute(@Nonnull RequestContext springRequestContext, @Nonnull ProfileRequestContext profileRequestContext)
Spring-aware actions can override this method to fully control the execution of an Action by the Web Flow engine.

Alternatively they may override `AbstractProfileAction.doExecute(ProfileRequestContext)` and access Spring information via a `SpringRequestContext` attached to the profile request context.

The default implementation attaches the Spring Web Flow request context to the profile request context tree to "narrow" the execution signature to the basic OpenSAML `ProfileAction` interface. After execution, an `EventContext` is sought, and used to return a result back to the Web Flow engine. If no context exists, a "proceed" event is signaled.

Overrides:
  `doExecute` in class `AbstractProfileAction`
Parameters:
  `springRequestContext` - the Spring request context
  `profileRequestContext` - a profile request context
Returns:
  a Web Flow event produced by the action