Class PopulateSignatureSigningParametersHandler
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.saml.common.binding.impl.PopulateSignatureSigningParametersHandler
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,MessageHandler
Handler that resolves and populates
SignatureSigningParameters on a SecurityParametersContext
created/accessed via a lookup function, by default as an immediate child context of the target
MessageContext.-
Field Summary
FieldsModifier and TypeFieldDescriptionStrategy used to look up a per-requestSignatureSigningConfigurationlist.Strategy used to look up an existingSecurityParametersContextto copy.private final org.slf4j.LoggerClass logger.private Function<MessageContext,SAMLMetadataContext> Strategy used to look up a SAML metadata context.private booleanWhether failure to resolve parameters should be raised as an error.Resolver for parameters to store into context.Strategy used to look up theSecurityParametersContextto set the parameters for. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voiddoInvoke(MessageContext messageContext) protected booleandoPreInvoke(MessageContext messageContext) voidsetConfigurationLookupStrategy(Function<MessageContext, List<SignatureSigningConfiguration>> strategy) Set the strategy used to look up a per-requestSignatureSigningConfigurationlist.voidsetExistingParametersContextLookupStrategy(Function<MessageContext, SecurityParametersContext> strategy) Set the strategy used to look up an existingSecurityParametersContextto copy instead of actually resolving the parameters to set.voidSet 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<MessageContext, SecurityParametersContext> strategy) Set the strategy used to look up theSecurityParametersContextto set the parameters for.voidSet 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, isPreInvokeCalled, setActivationConditionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
securityParametersContextLookupStrategy
@Nonnull private Function<MessageContext,SecurityParametersContext> securityParametersContextLookupStrategyStrategy used to look up theSecurityParametersContextto set the parameters for. -
existingParametersContextLookupStrategy
@Nullable private Function<MessageContext,SecurityParametersContext> existingParametersContextLookupStrategyStrategy used to look up an existingSecurityParametersContextto copy. -
configurationLookupStrategy
@NonnullAfterInit private Function<MessageContext,List<SignatureSigningConfiguration>> configurationLookupStrategyStrategy used to look up a per-requestSignatureSigningConfigurationlist. -
metadataContextLookupStrategy
Strategy used to look up a SAML metadata context. -
resolver
Resolver for parameters to store into context. -
noResultIsError
private boolean noResultIsErrorWhether failure to resolve parameters should be raised as an error.
-
-
Constructor Details
-
PopulateSignatureSigningParametersHandler
public PopulateSignatureSigningParametersHandler()Constructor.
-
-
Method Details
-
setSecurityParametersContextLookupStrategy
public void setSecurityParametersContextLookupStrategy(@Nonnull Function<MessageContext, SecurityParametersContext> strategy) Set the strategy used to look up theSecurityParametersContextto 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 existingSecurityParametersContextto 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 forSAMLMetadataContextfor 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-requestSignatureSigningConfigurationlist.- 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
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreInvoke
protected boolean doPreInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException - Overrides:
doPreInvokein classAbstractMessageHandler- Throws:
MessageHandlerException
-
doInvoke
- Specified by:
doInvokein classAbstractMessageHandler- Throws:
MessageHandlerException
-