Package org.opensaml.profile.action.impl

# Class PopulateDecryptionParameters

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
org.opensaml.profile.action.impl.PopulateDecryptionParameters

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

public class PopulateDecryptionParameters extends AbstractConditionalProfileAction
Action that resolves and populates `DecryptionParameters` on a `SecurityParametersContext` created/accessed via a lookup function, by default on the inbound message context.

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

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,List<DecryptionConfiguration>>`
`configurationLookupStrategy`
Strategy used to lookup a per-request `DecryptionConfiguration` list.
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,String>`
`recipientLookupStrategy`
Strategy used to look up the `SecurityParametersContext` to set the parameters for.
`private DecryptionParametersResolver`
`resolver`
Resolver for parameters to store into context.
`private Function<ProfileRequestContext,SecurityParametersContext>`
`securityParametersContextLookupStrategy`
Strategy used to look up the `SecurityParametersContext` to set the parameters for.

## Constructor Summary

Constructors
Constructor
Description
`PopulateDecryptionParameters()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
Performs this action.
`protected void`
`doInitialize()`
`void`
`setConfigurationLookupStrategy(Function<ProfileRequestContext,List<DecryptionConfiguration>> strategy)`
Set the strategy used to look up a per-request `DecryptionConfiguration` list.
`void`
`setDecryptionParametersResolver(DecryptionParametersResolver newResolver)`
Set the resolver to use for the parameters to store into the context.
`void`
`setRecipientLookupStrategy(Function<ProfileRequestContext,String> strategy)`
Set the strategy used to look up the dynamic recipient to include in decryption criteria.
`void`
`setSecurityParametersContextLookupStrategy(Function<ProfileRequestContext,SecurityParametersContext> strategy)`
Set the strategy used to look up the `SecurityParametersContext` to set the parameters for.

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

`doPreExecute, 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.

### securityParametersContextLookupStrategy

@Nonnull private Function<ProfileRequestContext,SecurityParametersContext> securityParametersContextLookupStrategy
Strategy used to look up the `SecurityParametersContext` to set the parameters for.

### configurationLookupStrategy

@NonnullAfterInit private Function<ProfileRequestContext,List<DecryptionConfiguration>> configurationLookupStrategy
Strategy used to lookup a per-request `DecryptionConfiguration` list.

### resolver

@NonnullAfterInit private DecryptionParametersResolver resolver
Resolver for parameters to store into context.

### recipientLookupStrategy

@Nullable private Function<ProfileRequestContext,String> recipientLookupStrategy
Strategy used to look up the `SecurityParametersContext` to set the parameters for.

## Constructor Details

### PopulateDecryptionParameters

public PopulateDecryptionParameters()
Constructor.

## Method Details

### setSecurityParametersContextLookupStrategy

public void setSecurityParametersContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SecurityParametersContext> strategy)
Set the strategy used to look up the `SecurityParametersContext` to set the parameters for.

Parameters:
  `strategy` - lookup strategy

### setConfigurationLookupStrategy

public void setConfigurationLookupStrategy(@Nonnull Function<ProfileRequestContext,List<DecryptionConfiguration>> strategy)
Set the strategy used to look up a per-request `DecryptionConfiguration` list.

Parameters:
  `strategy` - lookup strategy

### setRecipientLookupStrategy

public void setRecipientLookupStrategy(@Nullable Function<ProfileRequestContext,String> strategy)
Set the strategy used to look up the dynamic recipient to include in decryption criteria.

Parameters:
  `strategy` - to use

### setDecryptionParametersResolver

public void setDecryptionParametersResolver(@Nonnull DecryptionParametersResolver newResolver)
Set the resolver to use for the parameters to store into the context.

Parameters:
  `newResolver` - resolver to use

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
Performs this action. Actions must override this method to perform their work.

Overrides:
  `doExecute` in class `AbstractProfileAction`
Parameters:
  `profileRequestContext` - the current IdP profile request context