Package org.opensaml.saml.common.profile.impl

# Class PopulateSignatureSigningParameters

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
org.opensaml.profile.action.AbstractHandlerDelegatingProfileAction<PopulateSignatureSigningParametersHandler>
org.opensaml.saml.common.profile.impl.PopulateSignatureSigningParameters

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

public class PopulateSignatureSigningParameters extends AbstractHandlerDelegatingProfileAction<PopulateSignatureSigningParametersHandler>
Action that resolves and populates `SignatureSigningParameters` on a `SecurityParametersContext` created/accessed via a lookup function, by default on the outbound message context.

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

## Field Summary

Fields
Modifier and Type
Field
Description
`private Function<ProfileRequestContext,List<SignatureSigningConfiguration>>`
`configurationLookupStrategy`
Strategy used to look up a per-request `SignatureSigningConfiguration` list.
`private Function<ProfileRequestContext,SecurityParametersContext>`
`existingParametersContextLookupStrategy`
Strategy used to look up an existing `SecurityParametersContext` to copy.
`private final org.slf4j.Logger`
`log`
Class logger.
`private Function<ProfileRequestContext,SAMLMetadataContext>`
`metadataContextLookupStrategy`
Strategy used to look up a SAML metadata context.
`private boolean`
`noResultIsError`
Whether failure to resolve parameters should be raised as an error.
`private SignatureSigningParametersResolver`
`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
`PopulateSignatureSigningParameters()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doInitialize()`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
Called prior to execution, actions may override this method to perform pre-processing for a request.
`void`
`setConfigurationLookupStrategy(Function<ProfileRequestContext,List<SignatureSigningConfiguration>> strategy)`
Set the strategy used to look up a per-request `SignatureSigningConfiguration` list.
`void`
`setExistingParametersContextLookupStrategy(Function<ProfileRequestContext,SecurityParametersContext> strategy)`
Set the strategy used to look up an existing `SecurityParametersContext` to copy instead of actually resolving the parameters to set.
`void`
`setMetadataContextLookupStrategy(Function<ProfileRequestContext,SAMLMetadataContext> strategy)`
Set lookup strategy for `SAMLMetadataContext` for input to resolution.
`void`
`setNoResultIsError(boolean flag)`
Set whether a failure to resolve any parameters should be raised as an exception.
`void`
`setSecurityParametersContextLookupStrategy(Function<ProfileRequestContext,SecurityParametersContext> strategy)`
Set the strategy used to look up the `SecurityParametersContext` to set the parameters for.
`void`
`setSignatureSigningParametersResolver(SignatureSigningParametersResolver newResolver)`
Set the resolver to use for the parameters to store into the context.

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

`adapt, adapt, adaptRequired, doDestroy, doExecute, getDelegate, setErrorEvent`

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

### existingParametersContextLookupStrategy

@Nullable private Function<ProfileRequestContext,SecurityParametersContext> existingParametersContextLookupStrategy
Strategy used to look up an existing `SecurityParametersContext` to copy.

### configurationLookupStrategy

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

### metadataContextLookupStrategy

@Nullable private Function<ProfileRequestContext,SAMLMetadataContext> metadataContextLookupStrategy
Strategy used to look up a SAML metadata context.

### resolver

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

### noResultIsError

private boolean noResultIsError
Whether failure to resolve parameters should be raised as an error.

## Constructor Details

### PopulateSignatureSigningParameters

public PopulateSignatureSigningParameters()
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

### setExistingParametersContextLookupStrategy

public void setExistingParametersContextLookupStrategy(@Nullable Function<ProfileRequestContext,SecurityParametersContext> strategy)
Set the strategy used to look up an existing `SecurityParametersContext` to copy instead of actually resolving the parameters to set.

Parameters:
  `strategy` - lookup strategy

### setMetadataContextLookupStrategy

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

Parameters:
  `strategy` - lookup strategy

### setConfigurationLookupStrategy

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

Parameters:
  `strategy` - lookup strategy

### setSignatureSigningParametersResolver

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

Parameters:
  `newResolver` - resolver to use

### setNoResultIsError

public void setNoResultIsError(boolean flag)
Set whether a failure to resolve any parameters should be raised as an exception.

Defaults to false.

Parameters:
  `flag` - flag to set
Since:
  3.4.0

### doInitialize

protected void doInitialize() throws ComponentInitializationException

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

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
Called prior to execution, actions may override this method to perform pre-processing for a request.

If false is returned, execution will not proceed, and the action should attach an `EventContext` to the context tree to signal how to continue with overall workflow processing.

If returning successfully, the last step should be to return the result of the superclass version of this method.

Overrides:
  `doPreExecute` in class `AbstractConditionalProfileAction`
Parameters:
  `profileRequestContext` - the current IdP profile request context
Returns:
  true iff execution should proceed