Package net.shibboleth.oidc.profile.impl
Class PopulateJWTSignatureSigningParametersHandler
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
net.shibboleth.oidc.profile.impl.PopulateJWTSignatureSigningParametersHandler
- 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.
Extracts any OpenID client/provider metadata, SAML metadata, and static client credentials from relying party configuration as criteria to pass to the signing parameters resolver.
- Since:
- 2.2.0
-
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.private Function<MessageContext,OIDCMetadataContext> Strategy used to look up a OIDC client metadata context.Strategy used to look up a OIDC provider metadata context.private Function<MessageContext,RelyingPartyContext> Lookup function for relying party context.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) voidSet lookup strategy forOIDCMetadataContextfor input to resolution.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.voidsetProviderMetadataContextLookupStrategy(Function<MessageContext, OIDCProviderMetadataContext> strategy) Set lookup strategy forOIDCProviderMetadataContextfor input to resolution.voidSet lookup strategy for relying party context.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. -
oidcClientMetadataContextLookupStrategy
@Nonnull private Function<MessageContext,OIDCMetadataContext> oidcClientMetadataContextLookupStrategyStrategy used to look up a OIDC client metadata context. -
oidcProviderMetadataContextLookupStrategy
@Nonnull private Function<MessageContext,OIDCProviderMetadataContext> oidcProviderMetadataContextLookupStrategyStrategy used to look up a OIDC provider metadata context. -
relyingPartyContextLookupStrategy
Lookup function for relying party 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
-
PopulateJWTSignatureSigningParametersHandler
public PopulateJWTSignatureSigningParametersHandler()Constructor.
-
-
Method Details
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<MessageContext, RelyingPartyContext> strategy) Set lookup strategy for relying party context.- Parameters:
strategy- lookup strategy
-
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
-
setClientMetadataContextLookupStrategy
public void setClientMetadataContextLookupStrategy(@Nonnull Function<MessageContext, OIDCMetadataContext> strategy) Set lookup strategy forOIDCMetadataContextfor input to resolution.- Parameters:
strategy- lookup strategy
-
setProviderMetadataContextLookupStrategy
public void setProviderMetadataContextLookupStrategy(@Nonnull Function<MessageContext, OIDCProviderMetadataContext> strategy) Set lookup strategy forOIDCProviderMetadataContextfor input to resolution.- 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
-
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(@Nonnull 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
-
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
-
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
-