Class SelectProfileConfiguration
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
net.shibboleth.idp.profile.messaging.impl.SelectProfileConfiguration
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,MessageHandler
public class SelectProfileConfiguration extends AbstractMessageHandler
Action that selects the
ProfileConfiguration
for the given message context and sets it in the looked-up
RelyingPartyContext
.- Postcondition:
- InOutOperationContext.getSubcontext(RelyingPartyContext.class).getProfileConfiguration() != null
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.Logger
log
Class logger.private Function<MessageContext,String>
profileIdLookupStrategy
Strategy used to locate the effective profile ID associated with a givenMessageContext
.private Function<MessageContext,ProfileRequestContext>
profileRequestContextLookupStrategy
Strategy used to locate theProfileRequestContext
associated with a givenMessageContext
.private Function<MessageContext,RelyingPartyContext>
relyingPartyContextLookupStrategy
Strategy used to locate theRelyingPartyContext
associated with a givenMessageContext
.private RelyingPartyContext
rpCtx
The RelyingPartyContext to operate on. -
Constructor Summary
Constructors Constructor Description SelectProfileConfiguration()
Constructor. -
Method Summary
Modifier and Type Method Description protected void
doInitialize()
protected void
doInvoke(MessageContext messageContext)
protected boolean
doPreInvoke(MessageContext messageContext)
Function<MessageContext,ProfileRequestContext>
getProfileRequestContextLookupStrategy()
Get the strategy used to locate theProfileRequestContext
associated with a givenMessageContext
.void
setProfiledIdLookupStrategy(Function<MessageContext,String> strategy)
Set the strategy used to locate the effective profile ID associated with a givenMessageContext
.void
setProfileRequestContextLookupStrategy(Function<MessageContext,ProfileRequestContext> strategy)
Set the strategy used to locate theProfileRequestContext
associated with a givenMessageContext
.void
setRelyingPartyContextLookupStrategy(Function<MessageContext,RelyingPartyContext> strategy)
Set the strategy used to locate theRelyingPartyContext
associated with a givenMessageContext
.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 Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
relyingPartyContextLookupStrategy
@NonnullAfterInit private Function<MessageContext,RelyingPartyContext> relyingPartyContextLookupStrategyStrategy used to locate theRelyingPartyContext
associated with a givenMessageContext
. -
profileRequestContextLookupStrategy
@Nonnull private Function<MessageContext,ProfileRequestContext> profileRequestContextLookupStrategyStrategy used to locate theProfileRequestContext
associated with a givenMessageContext
. -
profileIdLookupStrategy
Strategy used to locate the effective profile ID associated with a givenMessageContext
. -
rpCtx
The RelyingPartyContext to operate on.
-
-
Constructor Details
-
SelectProfileConfiguration
public SelectProfileConfiguration()Constructor.
-
-
Method Details
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<MessageContext,RelyingPartyContext> strategy)Set the strategy used to locate theRelyingPartyContext
associated with a givenMessageContext
.- Parameters:
strategy
- strategy used to locate theRelyingPartyContext
associated with a givenMessageContext
-
getProfileRequestContextLookupStrategy
@Nonnull public Function<MessageContext,ProfileRequestContext> getProfileRequestContextLookupStrategy()Get the strategy used to locate theProfileRequestContext
associated with a givenMessageContext
.- Returns:
- lookup strategy
-
setProfileRequestContextLookupStrategy
public void setProfileRequestContextLookupStrategy(@Nonnull Function<MessageContext,ProfileRequestContext> strategy)Set the strategy used to locate theProfileRequestContext
associated with a givenMessageContext
.- Parameters:
strategy
- lookup strategy
-
setProfiledIdLookupStrategy
Set the strategy used to locate the effective profile ID associated with a givenMessageContext
.- Parameters:
strategy
- strategy used to locate theRelyingPartyContext
associated with a givenMessageContext
-
doInitialize
- Overrides:
doInitialize
in classAbstractInitializableComponent
- Throws:
ComponentInitializationException
-
doPreInvoke
protected boolean doPreInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException- Overrides:
doPreInvoke
in classAbstractMessageHandler
- Throws:
MessageHandlerException
-
doInvoke
- Specified by:
doInvoke
in classAbstractMessageHandler
- Throws:
MessageHandlerException
-