Class PopulateSignatureSigningParametersHandler
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.messaging.handler.AbstractMessageHandler
-
- org.opensaml.saml.common.binding.impl.PopulateSignatureSigningParametersHandler
-
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,MessageHandler
public class PopulateSignatureSigningParametersHandler extends AbstractMessageHandler
Handler that resolves and populatesSignatureSigningParameters
on aSecurityParametersContext
created/accessed via a lookup function, by default as an immediate child context of the targetMessageContext
.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<MessageContext,List<SignatureSigningConfiguration>>
configurationLookupStrategy
Strategy used to look up a per-requestSignatureSigningConfiguration
list.private Function<MessageContext,SecurityParametersContext>
existingParametersContextLookupStrategy
Strategy used to look up an existingSecurityParametersContext
to copy.private org.slf4j.Logger
log
Class logger.private Function<MessageContext,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<MessageContext,SecurityParametersContext>
securityParametersContextLookupStrategy
Strategy used to look up theSecurityParametersContext
to set the parameters for.
-
Constructor Summary
Constructors Constructor Description PopulateSignatureSigningParametersHandler()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doInitialize()
protected void
doInvoke(MessageContext messageContext)
protected boolean
doPreInvoke(MessageContext messageContext)
void
setConfigurationLookupStrategy(Function<MessageContext,List<SignatureSigningConfiguration>> strategy)
Set the strategy used to look up a per-requestSignatureSigningConfiguration
list.void
setExistingParametersContextLookupStrategy(Function<MessageContext,SecurityParametersContext> strategy)
Set the strategy used to look up an existingSecurityParametersContext
to copy instead of actually resolving the parameters to set.void
setMetadataContextLookupStrategy(Function<MessageContext,SAMLMetadataContext> strategy)
Set lookup strategy forSAMLMetadataContext
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<MessageContext,SecurityParametersContext> strategy)
Set the strategy used to look up theSecurityParametersContext
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.messaging.handler.AbstractMessageHandler
doPostInvoke, doPostInvoke, getActivationCondition, getLogPrefix, invoke, setActivationCondition
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, 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.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
securityParametersContextLookupStrategy
@Nonnull private Function<MessageContext,SecurityParametersContext> securityParametersContextLookupStrategy
Strategy used to look up theSecurityParametersContext
to set the parameters for.
-
existingParametersContextLookupStrategy
@Nullable private Function<MessageContext,SecurityParametersContext> existingParametersContextLookupStrategy
Strategy used to look up an existingSecurityParametersContext
to copy.
-
configurationLookupStrategy
@NonnullAfterInit private Function<MessageContext,List<SignatureSigningConfiguration>> configurationLookupStrategy
Strategy used to look up a per-requestSignatureSigningConfiguration
list.
-
metadataContextLookupStrategy
@Nullable private Function<MessageContext,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.
-
-
Method Detail
-
setSecurityParametersContextLookupStrategy
public void setSecurityParametersContextLookupStrategy(@Nonnull Function<MessageContext,SecurityParametersContext> strategy)
Set the strategy used to look up theSecurityParametersContext
to set the parameters for.- Parameters:
strategy
- lookup strategy
-
setExistingParametersContextLookupStrategy
public void setExistingParametersContextLookupStrategy(@Nullable Function<MessageContext,SecurityParametersContext> strategy)
Set the strategy used to look up an existingSecurityParametersContext
to copy instead of actually resolving the parameters to set.- Parameters:
strategy
- lookup strategy
-
setMetadataContextLookupStrategy
public void setMetadataContextLookupStrategy(@Nullable Function<MessageContext,SAMLMetadataContext> strategy)
Set lookup strategy forSAMLMetadataContext
for input to resolution.- Parameters:
strategy
- lookup strategy
-
setConfigurationLookupStrategy
public void setConfigurationLookupStrategy(@Nonnull Function<MessageContext,List<SignatureSigningConfiguration>> strategy)
Set the strategy used to look up a per-requestSignatureSigningConfiguration
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 classAbstractInitializableComponent
- Throws:
ComponentInitializationException
-
doPreInvoke
protected boolean doPreInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException
- Overrides:
doPreInvoke
in classAbstractMessageHandler
- Throws:
MessageHandlerException
-
doInvoke
protected void doInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException
- Specified by:
doInvoke
in classAbstractMessageHandler
- Throws:
MessageHandlerException
-
-