Package net.shibboleth.idp.saml.session.impl

# Class AddLogoutRequest

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
net.shibboleth.idp.saml.session.impl.AddLogoutRequest

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`

public class AddLogoutRequest extends AbstractProfileAction
Action that creates a `LogoutRequest` based on an `SAML2SPSession` in a `LogoutPropagationContext` and sets it as the message returned by `InOutOperationContext.getOutboundMessageContext()`.

If an issuer value is returned via a lookup strategy, then it's set as the Issuer of the message.

Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.INVALID_MSG_CTX`, `EventIds.INVALID_PROFILE_CTX`, `EventIds.MESSAGE_PROC_ERROR`
Postcondition:
  ProfileRequestContext.getOutboundMessageContext().getMessage() != null

## Field Summary

Fields
Modifier and Type
Field
Description
`private IdentifierGenerationStrategy`
`idGenerator`
The generator to use.
`private Function<ProfileRequestContext,IdentifierGenerationStrategy>`
`idGeneratorLookupStrategy`
Strategy used to locate the `IdentifierGenerationStrategy` to use.
`private boolean`
`includeSessionIndex`
Include SessionIndex in the request?
`private String`
`issuerId`
EntityID to populate into Issuer element.
`private Function<ProfileRequestContext,String>`
`issuerLookupStrategy`
Strategy used to obtain the response issuer value.
`private org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,LogoutPropagationContext>`
`logoutPropContextLookupStrategy`
Logout propagation context lookup strategy.
`private boolean`
`overwriteExisting`
Overwrite an existing message?
`private SAML2SPSession`
`saml2Session`
The `SAML2SPSession` to base the inbound context on.

## Constructor Summary

Constructors
Constructor
Description
`AddLogoutRequest()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`void`
`setIdentifierGeneratorLookupStrategy(Function<ProfileRequestContext,IdentifierGenerationStrategy> strategy)`
Set the strategy used to locate the `IdentifierGenerationStrategy` to use.
`void`
`setIncludeSessionIndex(boolean flag)`
Set whether to include a SessionIndex in the request.
`void`
`setIssuerLookupStrategy(Function<ProfileRequestContext,String> strategy)`
Set the strategy used to locate the issuer value to use.
`void`
`setLogoutPropagationContextLookupStrategy(Function<ProfileRequestContext,LogoutPropagationContext> strategy)`
Set the logout propagation context lookup strategy.
`void`
`setOverwriteExisting(boolean flag)`
Set whether to overwrite an existing message.

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

`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

### log

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

### overwriteExisting

private boolean overwriteExisting
Overwrite an existing message?

### includeSessionIndex

private boolean includeSessionIndex
Include SessionIndex in the request?

### idGeneratorLookupStrategy

@Nonnull private Function<ProfileRequestContext,IdentifierGenerationStrategy> idGeneratorLookupStrategy
Strategy used to locate the `IdentifierGenerationStrategy` to use.

### issuerLookupStrategy

@Nullable private Function<ProfileRequestContext,String> issuerLookupStrategy
Strategy used to obtain the response issuer value.

### logoutPropContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,LogoutPropagationContext> logoutPropContextLookupStrategy
Logout propagation context lookup strategy.

### idGenerator

@NonnullBeforeExec private IdentifierGenerationStrategy idGenerator
The generator to use.

### saml2Session

@NonnullBeforeExec private SAML2SPSession saml2Session
The `SAML2SPSession` to base the inbound context on.

### issuerId

@Nullable private String issuerId
EntityID to populate into Issuer element.

## Constructor Details

### AddLogoutRequest

public AddLogoutRequest()
Constructor.

## Method Details

### setOverwriteExisting

public void setOverwriteExisting(boolean flag)
Set whether to overwrite an existing message.

Parameters:
  `flag` - flag to set

### setIncludeSessionIndex

public void setIncludeSessionIndex(boolean flag)
Set whether to include a SessionIndex in the request.

Parameters:
  `flag` - flag to set

### setIdentifierGeneratorLookupStrategy

public void setIdentifierGeneratorLookupStrategy(@Nonnull Function<ProfileRequestContext,IdentifierGenerationStrategy> strategy)
Set the strategy used to locate the `IdentifierGenerationStrategy` to use.

Parameters:
  `strategy` - lookup strategy

### setIssuerLookupStrategy

public void setIssuerLookupStrategy(@Nullable Function<ProfileRequestContext,String> strategy)
Set the strategy used to locate the issuer value to use.

Parameters:
  `strategy` - lookup strategy

### setLogoutPropagationContextLookupStrategy

public void setLogoutPropagationContextLookupStrategy(@Nonnull Function<ProfileRequestContext,LogoutPropagationContext> strategy)
Set the logout propagation context lookup strategy.

Parameters:
  `strategy` - lookup strategy

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doPreExecute` in class `AbstractProfileAction`

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`