Package net.shibboleth.idp.session.impl

# Class PopulateMultiRPContextFromLogoutContext

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

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

public class PopulateMultiRPContextFromLogoutContext extends AbstractProfileAction
Profile action that populates a `MultiRelyingPartyContext` with the relying party information from a `LogoutContext`, and extends each `RelyingPartyContext` created with a `SAMLMetadataContext` based on metadata lookup.

Any existing `MultiRelyingPartyContext` will be replaced.

Event:
  `EventIds.PROCEED_EVENT_ID`
Postcondition:
  If (ProfileRequestContext.getSubcontext(LogoutContext.class) != null, then ProfileRequestContext.getSubcontext(MultiRelyingPartyContext.class) != null

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final String`
`LABEL`
Label for `MultiRelyingPartyContext` entries.
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,LogoutContext>`
`logoutContextLookupStrategy`
Lookup function for `LogoutContext`.
`private LogoutContext`
`logoutCtx`
`LogoutContext` to process.
`private RoleDescriptorResolver`
`metadataResolver`
Resolver used to look up SAML metadata.
`private QName`
`role`
Role to resolve metadata for.

## Constructor Summary

Constructors
Constructor
Description
`PopulateMultiRPContextFromLogoutContext()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected void`
`doInitialize()`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`void`
`setLogoutContextLookupStrategy(Function<ProfileRequestContext,LogoutContext> strategy)`
Set the lookup strategy for the LogoutContext to process.
`void`
`setRole(QName theRole)`
Set the metadata role to lookup.
`void`
`setRoleDescriptorResolver(RoleDescriptorResolver resolver)`
Set the `RoleDescriptorResolver` 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, 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

### LABEL

@Nonnull @NotEmpty private static final String LABEL
Label for `MultiRelyingPartyContext` entries.

See Also:
  - Constant Field Values

### log

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

### metadataResolver

@NonnullAfterInit private RoleDescriptorResolver metadataResolver
Resolver used to look up SAML metadata.

### logoutContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,LogoutContext> logoutContextLookupStrategy
Lookup function for `LogoutContext`.

### role

@Nonnull private QName role
Role to resolve metadata for.

### logoutCtx

@NonnullBeforeExec private LogoutContext logoutCtx
`LogoutContext` to process.

## Constructor Details

### PopulateMultiRPContextFromLogoutContext

public PopulateMultiRPContextFromLogoutContext()
Constructor.

## Method Details

### setRoleDescriptorResolver

public void setRoleDescriptorResolver(@Nonnull RoleDescriptorResolver resolver)
Set the `RoleDescriptorResolver` to use.

Parameters:
  `resolver` - the resolver to use

### setLogoutContextLookupStrategy

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

Parameters:
  `strategy` - lookup strategy

### setRole

public void setRole(@Nonnull QName theRole)
Set the metadata role to lookup.

Defaults to `SPSSODescriptor.DEFAULT_ELEMENT_NAME`.

Parameters:
  `theRole` - the role element or type

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