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

# Class PrepareInboundMessageContext

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

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

public class PrepareInboundMessageContext extends AbstractProfileAction
Action that adds an inbound `MessageContext` and a `SAMLPeerEntityContext` to the `ProfileRequestContext` based on the identity of a relying party, by default from a `SAML2SPSession` found in a `LogoutPropagationContext`.

This action primarily mocks up a minimal amount of machinery on the inbound message side to drive a SAML 2 Logout Propagation flow, which needs to issue a logout request message for the `SAML2SPSession` it's given.

It has some generic capability to allow it to be used for some other outbound messaging cases, such as SAML 2 SSO proxying.

Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.INVALID_PROFILE_CTX`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,LogoutPropagationContext>`
`logoutPropContextLookupStrategy`
Logout propagation context lookup strategy.
`private String`
`relyingPartyId`
The relying party name to base the inbound context on.
`private Function<ProfileRequestContext,String>`
`relyingPartyLookupStrategy`
Optional circumvention of usual method to identify the relying party name.

## Constructor Summary

Constructors
Constructor
Description
`PrepareInboundMessageContext()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`void`
`setLogoutPropagationContextLookupStrategy(Function<ProfileRequestContext,LogoutPropagationContext> strategy)`
Set the logout propagation context lookup strategy.
`void`
`setRelyingPartyLookupStrategy(Function<ProfileRequestContext,String> 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.

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

### logoutPropContextLookupStrategy

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

### relyingPartyLookupStrategy

@Nullable private Function<ProfileRequestContext,String> relyingPartyLookupStrategy
Optional circumvention of usual method to identify the relying party name.

### relyingPartyId

@NonnullBeforeExec private String relyingPartyId
The relying party name to base the inbound context on.

## Constructor Details

### PrepareInboundMessageContext

public PrepareInboundMessageContext()
Constructor.

## Method Details

### setLogoutPropagationContextLookupStrategy

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

Parameters:
  `strategy` - lookup strategy

### setRelyingPartyLookupStrategy

public void setRelyingPartyLookupStrategy(@Nullable Function<ProfileRequestContext,String> 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
Since:
  4.0.0

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doPreExecute` in class `AbstractConditionalProfileAction`

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`