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

# Class InitializeOutboundMessageContext

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.profile.impl.InitializeOutboundMessageContext

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

public class InitializeOutboundMessageContext extends AbstractProfileAction
Action that adds an outbound `MessageContext` and related SAML contexts to the `ProfileRequestContext` based on the identity of a relying party accessed via a lookup strategy, by default an immediate child of the profile request context.

A `SAMLSelfEntityContext` is created based on the identity of the IdP, as derived by a lookup strategy. A `SAMLPeerEntityContext` and `SAMLMetadataContext` are created based on the `SAMLPeerEntityContext` that underlies the `RelyingPartyContext`.

Event:
  `EventIds.PROCEED_EVENT_ID`, `IdPEventIds.INVALID_RELYING_PARTY_CTX`

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private SAMLPeerEntityContext`
`peerEntityCtx`
The `SAMLPeerEntityContext` to base the outbound context on.
`private Function<ProfileRequestContext,RelyingPartyContext>`
`relyingPartyContextLookupStrategy`
Relying party context lookup strategy.
`private Function<ProfileRequestContext,String>`
`selfIdentityLookupStrategy`
Strategy used to obtain the self identity value.

## Constructor Summary

Constructors
Constructor
Description
`InitializeOutboundMessageContext()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`void`
`setRelyingPartyContextLookupStrategy(Function<ProfileRequestContext,RelyingPartyContext> strategy)`
Set the relying party context lookup strategy.
`void`
`setSelfIdentityLookupStrategy(Function<ProfileRequestContext,String> strategy)`
Set the strategy used to locate the self identity value to use.

### 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.

### relyingPartyContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy
Relying party context lookup strategy.

### selfIdentityLookupStrategy

@Nonnull private Function<ProfileRequestContext,String> selfIdentityLookupStrategy
Strategy used to obtain the self identity value.

### peerEntityCtx

@NonnullBeforeExec private SAMLPeerEntityContext peerEntityCtx
The `SAMLPeerEntityContext` to base the outbound context on.

## Constructor Details

### InitializeOutboundMessageContext

public InitializeOutboundMessageContext()
Constructor.

## Method Details

### setRelyingPartyContextLookupStrategy

public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext,RelyingPartyContext> strategy)
Set the relying party context lookup strategy.

Parameters:
  `strategy` - lookup strategy

### setSelfIdentityLookupStrategy

public void setSelfIdentityLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)
Set the strategy used to locate the self identity value to use.

Parameters:
  `strategy` - lookup strategy

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doPreExecute` in class `AbstractConditionalProfileAction`

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`