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:
net.shibboleth.utilities.java.support.component.Component,net.shibboleth.utilities.java.support.component.DestructableComponent,net.shibboleth.utilities.java.support.component.InitializableComponent,org.opensaml.messaging.handler.MessageHandler
public class PopulateSignatureSigningParametersHandler extends org.opensaml.messaging.handler.AbstractMessageHandlerHandler that resolves and populatesSignatureSigningParameterson aSecurityParametersContextcreated/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<org.opensaml.messaging.context.MessageContext,List<org.opensaml.xmlsec.SignatureSigningConfiguration>>configurationLookupStrategyStrategy used to look up a per-requestSignatureSigningConfigurationlist.private Function<org.opensaml.messaging.context.MessageContext,org.opensaml.xmlsec.context.SecurityParametersContext>existingParametersContextLookupStrategyStrategy used to look up an existingSecurityParametersContextto copy.private org.slf4j.LoggerlogClass logger.private Function<org.opensaml.messaging.context.MessageContext,org.opensaml.saml.common.messaging.context.SAMLMetadataContext>metadataContextLookupStrategyStrategy used to look up a SAML metadata context.private booleannoResultIsErrorWhether failure to resolve parameters should be raised as an error.private org.opensaml.xmlsec.SignatureSigningParametersResolverresolverResolver for parameters to store into context.private Function<org.opensaml.messaging.context.MessageContext,org.opensaml.xmlsec.context.SecurityParametersContext>securityParametersContextLookupStrategyStrategy used to look up theSecurityParametersContextto 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 voiddoInitialize()protected voiddoInvoke(org.opensaml.messaging.context.MessageContext messageContext)protected booleandoPreInvoke(org.opensaml.messaging.context.MessageContext messageContext)voidsetConfigurationLookupStrategy(Function<org.opensaml.messaging.context.MessageContext,List<org.opensaml.xmlsec.SignatureSigningConfiguration>> strategy)Set the strategy used to look up a per-requestSignatureSigningConfigurationlist.voidsetExistingParametersContextLookupStrategy(Function<org.opensaml.messaging.context.MessageContext,org.opensaml.xmlsec.context.SecurityParametersContext> strategy)Set the strategy used to look up an existingSecurityParametersContextto copy instead of actually resolving the parameters to set.voidsetMetadataContextLookupStrategy(Function<org.opensaml.messaging.context.MessageContext,org.opensaml.saml.common.messaging.context.SAMLMetadataContext> strategy)Set lookup strategy forSAMLMetadataContextfor input to resolution.voidsetNoResultIsError(boolean flag)Set whether a failure to resolve any parameters should be raised as an exception.voidsetSecurityParametersContextLookupStrategy(Function<org.opensaml.messaging.context.MessageContext,org.opensaml.xmlsec.context.SecurityParametersContext> strategy)Set the strategy used to look up theSecurityParametersContextto set the parameters for.voidsetSignatureSigningParametersResolver(org.opensaml.xmlsec.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
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
securityParametersContextLookupStrategy
@Nonnull private Function<org.opensaml.messaging.context.MessageContext,org.opensaml.xmlsec.context.SecurityParametersContext> securityParametersContextLookupStrategy
Strategy used to look up theSecurityParametersContextto set the parameters for.
-
existingParametersContextLookupStrategy
@Nullable private Function<org.opensaml.messaging.context.MessageContext,org.opensaml.xmlsec.context.SecurityParametersContext> existingParametersContextLookupStrategy
Strategy used to look up an existingSecurityParametersContextto copy.
-
configurationLookupStrategy
@NonnullAfterInit private Function<org.opensaml.messaging.context.MessageContext,List<org.opensaml.xmlsec.SignatureSigningConfiguration>> configurationLookupStrategy
Strategy used to look up a per-requestSignatureSigningConfigurationlist.
-
metadataContextLookupStrategy
@Nullable private Function<org.opensaml.messaging.context.MessageContext,org.opensaml.saml.common.messaging.context.SAMLMetadataContext> metadataContextLookupStrategy
Strategy used to look up a SAML metadata context.
-
resolver
@NonnullAfterInit private org.opensaml.xmlsec.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<org.opensaml.messaging.context.MessageContext,org.opensaml.xmlsec.context.SecurityParametersContext> strategy)Set the strategy used to look up theSecurityParametersContextto set the parameters for.- Parameters:
strategy- lookup strategy
-
setExistingParametersContextLookupStrategy
public void setExistingParametersContextLookupStrategy(@Nullable Function<org.opensaml.messaging.context.MessageContext,org.opensaml.xmlsec.context.SecurityParametersContext> strategy)Set the strategy used to look up an existingSecurityParametersContextto copy instead of actually resolving the parameters to set.- Parameters:
strategy- lookup strategy
-
setMetadataContextLookupStrategy
public void setMetadataContextLookupStrategy(@Nullable Function<org.opensaml.messaging.context.MessageContext,org.opensaml.saml.common.messaging.context.SAMLMetadataContext> strategy)Set lookup strategy forSAMLMetadataContextfor input to resolution.- Parameters:
strategy- lookup strategy
-
setConfigurationLookupStrategy
public void setConfigurationLookupStrategy(@Nonnull Function<org.opensaml.messaging.context.MessageContext,List<org.opensaml.xmlsec.SignatureSigningConfiguration>> strategy)Set the strategy used to look up a per-requestSignatureSigningConfigurationlist.- Parameters:
strategy- lookup strategy
-
setSignatureSigningParametersResolver
public void setSignatureSigningParametersResolver(@Nonnull org.opensaml.xmlsec.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 net.shibboleth.utilities.java.support.component.ComponentInitializationException- Overrides:
doInitializein classnet.shibboleth.utilities.java.support.component.AbstractInitializableComponent- Throws:
net.shibboleth.utilities.java.support.component.ComponentInitializationException
-
doPreInvoke
protected boolean doPreInvoke(@Nonnull org.opensaml.messaging.context.MessageContext messageContext) throws org.opensaml.messaging.handler.MessageHandlerException- Overrides:
doPreInvokein classorg.opensaml.messaging.handler.AbstractMessageHandler- Throws:
org.opensaml.messaging.handler.MessageHandlerException
-
doInvoke
protected void doInvoke(@Nonnull org.opensaml.messaging.context.MessageContext messageContext) throws org.opensaml.messaging.handler.MessageHandlerException- Specified by:
doInvokein classorg.opensaml.messaging.handler.AbstractMessageHandler- Throws:
org.opensaml.messaging.handler.MessageHandlerException
-
-