Class InitializeRelyingPartyContextFromSAMLPeer
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
net.shibboleth.idp.saml.messaging.impl.InitializeRelyingPartyContextFromSAMLPeer
- All Implemented Interfaces:
Component
,DestructableComponent
,InitializableComponent
,MessageHandler
Message handler that adds a
RelyingPartyContext
to the current InOutOperationContext
tree
via a creation function. The context is populated via a lookup strategy to locate a SAMLPeerEntityContext
,
by default as a direct child of the parent InOutOperationContext
.- Postcondition:
- InOutOperationContext.getSubcontext(RelyingPartyContext.class) != null and populated as above.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Class logger.private Function<MessageContext,
SAMLPeerEntityContext> Strategy used to look up theSAMLPeerEntityContext
to draw from.private SAMLPeerEntityContext
SAML peer entity context to populate from.private Function<MessageContext,
RelyingPartyContext> Strategy that will return or create aRelyingPartyContext
.private static final Function<RelyingPartyContext,
String> The relying party ID lookup function to inject.private static final Function<RelyingPartyContext,
Boolean> The verification lookup function to inject. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doInvoke
(MessageContext messageContext) protected boolean
doPreInvoke
(MessageContext messageContext) void
Set the strategy used to look up theSAMLPeerEntityContext
to draw from.void
Set the strategy used to return or create theRelyingPartyContext
.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, doInitialize, 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
-
RPID_LOOKUP
The relying party ID lookup function to inject. -
VERIFY_LOOKUP
The verification lookup function to inject. -
log
@Nonnull private final org.slf4j.Logger logClass logger. -
relyingPartyContextCreationStrategy
Strategy that will return or create aRelyingPartyContext
. -
peerEntityContextLookupStrategy
Strategy used to look up theSAMLPeerEntityContext
to draw from. -
peerEntityCtx
SAML peer entity context to populate from.
-
-
Constructor Details
-
InitializeRelyingPartyContextFromSAMLPeer
public InitializeRelyingPartyContextFromSAMLPeer()Constructor.
-
-
Method Details
-
setRelyingPartyContextCreationStrategy
public void setRelyingPartyContextCreationStrategy(@Nonnull Function<MessageContext, RelyingPartyContext> strategy) Set the strategy used to return or create theRelyingPartyContext
.- Parameters:
strategy
- creation strategy
-
setPeerEntityContextLookupStrategy
public void setPeerEntityContextLookupStrategy(@Nonnull Function<MessageContext, SAMLPeerEntityContext> strategy) Set the strategy used to look up theSAMLPeerEntityContext
to draw from.- Parameters:
strategy
- strategy used to look up theSAMLPeerEntityContext
-
doPreInvoke
protected boolean doPreInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException - Overrides:
doPreInvoke
in classAbstractMessageHandler
- Throws:
MessageHandlerException
-
doInvoke
- Specified by:
doInvoke
in classAbstractMessageHandler
- Throws:
MessageHandlerException
-