Package net.shibboleth.idp.saml.saml2.profile.impl

# Class SOAPLogoutRequest

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.saml.saml2.profile.impl.SOAPLogoutRequest

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

public class SOAPLogoutRequest extends AbstractProfileAction
Profile action that propagates a prepared `LogoutRequest` message to an SP via the SOAP binding, encapsulating SOAP pipeline construction and execution.

The outbound message is pulled from the `ProfileRequestContext` to allow the surrounding flow to remain largely SOAP-unaware.

Success or failure is reflected in a `LogoutPropagationContext` accessed via a lookup strategy.

The response message is also stored off in the inbound message context.

Since:
  4.0.0
Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.INVALID_PROFILE_CTX`, `EventIds.INVALID_MSG_CTX`, `EventIds.INVALID_MESSAGE`, `EventIds.IO_ERROR`
Postcondition:
  `LogoutPropagationContext.getResult()` reflects the status of the logout attempt., profileRequestContext.getInboundMessageContext().getMessage() is populated if a response is obtained.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,SAMLEndpointContext>`
`endpointContextLookupStrategy`
Strategy function for access to `SAMLEndpointContext` to retrieve address from.
`private SAMLEndpointContext`
`epContext`
Endpoint context to determine destination address.
`private final org.slf4j.Logger`
`log`
Class logger.
`private LogoutRequest`
`logoutRequest`
LogoutRequest to process.
`private Function<ProfileRequestContext,LogoutRequest>`
`logoutRequestLookupStrategy`
Lookup strategy for `LogoutRequest` to process.
`private SAMLMetadataContext`
`mdContext`
Optional metadata for use in SOAP client.
`private Function<ProfileRequestContext,SAMLMetadataContext>`
`metadataContextLookupStrategy`
Strategy function for access to `SAMLMetadataContext` for input to SOAP client.
`private LogoutPropagationContext`
`propagationContext`
LogoutPropagationContext.
`private Function<ProfileRequestContext,LogoutPropagationContext>`
`propagationContextLookupStrategy`
Lookup strategy for context in which to report result.
`private SOAPClient`
`soapClient`
SOAP client.
`private String`
`soapPipelineName`
The SOAP client message pipeline name.

## Constructor Summary

Constructors
Constructor
Description
`SOAPLogoutRequest()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected void`
`doInitialize()`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`private void`
`handleResponse(ProfileRequestContext profileRequestContext, LogoutResponse response)`
Turn status from response into an appropriate result.
`void`
`setEndpointContextLookupStrategy(Function<ProfileRequestContext,SAMLEndpointContext> strategy)`
Set lookup strategy for `SAMLEndpointContext` to read from.
`void`
`setLogoutRequestLookupStrategy(Function<ProfileRequestContext,LogoutRequest> strategy)`
Set the lookup strategy for the `LogoutRequest` to send.
`void`
`setMetadataContextLookupStrategy(Function<ProfileRequestContext,SAMLMetadataContext> strategy)`
Set lookup strategy for `SAMLMetadataContext` for input to SOAP client.
`void`
`setPropagationContextLookupStrategy(Function<ProfileRequestContext,LogoutPropagationContext> strategy)`
Set the lookup strategy for the `LogoutPropagationContext` to update.
`void`
`setSOAPClient(SOAPClient client)`
Set the SOAP client instance.
`void`
`setSOAPPipelineName(String name)`
Set the name of the specific SOAP client message pipeline to use, for example with `PipelineFactoryHttpSOAPClient`.

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

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

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

`getActivationCondition, setActivationCondition`

### 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, 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 final org.slf4j.Logger log
Class logger.

### logoutRequestLookupStrategy

@Nonnull private Function<ProfileRequestContext,LogoutRequest> logoutRequestLookupStrategy
Lookup strategy for `LogoutRequest` to process.

### propagationContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,LogoutPropagationContext> propagationContextLookupStrategy
Lookup strategy for context in which to report result.

### metadataContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,SAMLMetadataContext> metadataContextLookupStrategy
Strategy function for access to `SAMLMetadataContext` for input to SOAP client.

### endpointContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,SAMLEndpointContext> endpointContextLookupStrategy
Strategy function for access to `SAMLEndpointContext` to retrieve address from.

### soapClient

@NonnullAfterInit private SOAPClient soapClient
SOAP client.

### soapPipelineName

@Nullable @NotEmpty private String soapPipelineName
The SOAP client message pipeline name.

### logoutRequest

@NonnullBeforeExec private LogoutRequest logoutRequest
LogoutRequest to process.

### propagationContext

@NonnullBeforeExec private LogoutPropagationContext propagationContext
LogoutPropagationContext.

### mdContext

@Nullable private SAMLMetadataContext mdContext
Optional metadata for use in SOAP client.

### epContext

@NonnullBeforeExec private SAMLEndpointContext epContext
Endpoint context to determine destination address.

## Constructor Details

### SOAPLogoutRequest

public SOAPLogoutRequest()
Constructor.

## Method Details

### setLogoutRequestLookupStrategy

public void setLogoutRequestLookupStrategy(@Nonnull Function<ProfileRequestContext,LogoutRequest> strategy)
Set the lookup strategy for the `LogoutRequest` to send.

Parameters:
  `strategy` - lookup strategy

### setPropagationContextLookupStrategy

public void setPropagationContextLookupStrategy(@Nonnull Function<ProfileRequestContext,LogoutPropagationContext> strategy)
Set the lookup strategy for the `LogoutPropagationContext` to update.

Parameters:
  `strategy` - lookup strategy

### setMetadataContextLookupStrategy

public void setMetadataContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLMetadataContext> strategy)
Set lookup strategy for `SAMLMetadataContext` for input to SOAP client.

Parameters:
  `strategy` - lookup strategy

### setEndpointContextLookupStrategy

public void setEndpointContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLEndpointContext> strategy)
Set lookup strategy for `SAMLEndpointContext` to read from.

Parameters:
  `strategy` - lookup strategy

### setSOAPClient

public void setSOAPClient(@Nonnull SOAPClient client)
Set the SOAP client instance.

Parameters:
  `client` - the SOAP client

### setSOAPPipelineName

public void setSOAPPipelineName(@Nullable @NotEmpty String name)
Set the name of the specific SOAP client message pipeline to use, for example with `PipelineFactoryHttpSOAPClient`.

Parameters:
  `name` - the pipeline name, or null

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doPreExecute` in class `AbstractConditionalProfileAction`

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`

### handleResponse

private void handleResponse(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull LogoutResponse response)
Turn status from response into an appropriate result.

Parameters:
  `profileRequestContext` - current profile request context
  `response` - message to examine