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
public class InitializeRelyingPartyContextFromSAMLPeer extends AbstractMessageHandler
Message handler that adds aRelyingPartyContextto the currentInOutOperationContexttree via a creation function. The context is populated via a lookup strategy to locate aSAMLPeerEntityContext, by default as a direct child of the parentInOutOperationContext.- Postcondition:
- InOutOperationContext.getSubcontext(RelyingPartyContext.class) != null and populated as above.
-
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.LoggerlogClass logger.private Function<MessageContext,SAMLPeerEntityContext>peerEntityContextLookupStrategyStrategy used to look up theSAMLPeerEntityContextto draw from.private SAMLPeerEntityContextpeerEntityCtxSAML peer entity context to populate from.private Function<MessageContext,RelyingPartyContext>relyingPartyContextCreationStrategyStrategy that will return or create aRelyingPartyContext.private static Function<RelyingPartyContext,String>RPID_LOOKUPThe relying party ID lookup function to inject.private static Function<RelyingPartyContext,Boolean>VERIFY_LOOKUPThe verification lookup function to inject.
-
Constructor Summary
Constructors Constructor Description InitializeRelyingPartyContextFromSAMLPeer()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInvoke(MessageContext messageContext)protected booleandoPreInvoke(MessageContext messageContext)voidsetPeerEntityContextLookupStrategy(Function<MessageContext,SAMLPeerEntityContext> strategy)Set the strategy used to look up theSAMLPeerEntityContextto draw from.voidsetRelyingPartyContextCreationStrategy(Function<MessageContext,RelyingPartyContext> strategy)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 Detail
-
RPID_LOOKUP
@Nonnull private static final Function<RelyingPartyContext,String> RPID_LOOKUP
The relying party ID lookup function to inject.
-
VERIFY_LOOKUP
@Nonnull private static final Function<RelyingPartyContext,Boolean> VERIFY_LOOKUP
The verification lookup function to inject.
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
relyingPartyContextCreationStrategy
@Nonnull private Function<MessageContext,RelyingPartyContext> relyingPartyContextCreationStrategy
Strategy that will return or create aRelyingPartyContext.
-
peerEntityContextLookupStrategy
@Nonnull private Function<MessageContext,SAMLPeerEntityContext> peerEntityContextLookupStrategy
Strategy used to look up theSAMLPeerEntityContextto draw from.
-
peerEntityCtx
@Nullable private SAMLPeerEntityContext peerEntityCtx
SAML peer entity context to populate from.
-
-
Method Detail
-
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 theSAMLPeerEntityContextto draw from.- Parameters:
strategy- strategy used to look up theSAMLPeerEntityContext
-
doPreInvoke
protected boolean doPreInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException- Overrides:
doPreInvokein classAbstractMessageHandler- Throws:
MessageHandlerException
-
doInvoke
protected void doInvoke(@Nonnull MessageContext messageContext) throws MessageHandlerException- Specified by:
doInvokein classAbstractMessageHandler- Throws:
MessageHandlerException
-
-