Class InitializeOutboundMessageContextForError
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.profile.action.AbstractProfileAction
-
- org.opensaml.profile.action.AbstractConditionalProfileAction
-
- net.shibboleth.idp.profile.AbstractProfileAction
-
- net.shibboleth.idp.saml.profile.impl.InitializeOutboundMessageContextForError
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class InitializeOutboundMessageContextForError extends AbstractProfileAction
Action that prepares an outboundMessageContextand related SAML contexts in the event that they are not already prepared, to allow error responses to be generated in the case of synchronous bindings (i.e., SOAP).This is a "make-up" action that fills in missing information that may not have been populated in the course of normal processing, if an error occurs early in profile processing. It does nothing if an outbound message context already exists.
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_MSG_CTX- Postcondition:
ProfileRequestContext.getOutboundMessageContext() != null
-
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,SAMLBindingContext>bindingContextLookupStrategyStrategy function for access toSAMLBindingContextto populate.private org.slf4j.LoggerlogClass logger.private BindingDescriptoroutboundBindingOutbound binding to use.private SAMLPeerEntityContextpeerEntityCtxTheSAMLPeerEntityContextto base the outbound context on, if any.private Function<ProfileRequestContext,RelyingPartyContext>relyingPartyContextLookupStrategyRelying party context lookup strategy.
-
Constructor Summary
Constructors Constructor Description InitializeOutboundMessageContextForError()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()protected booleandoPreExecute(ProfileRequestContext profileRequestContext)voidsetBindingContextLookupStrategy(Function<ProfileRequestContext,SAMLBindingContext> strategy)Set lookup strategy forSAMLBindingContextto populate.voidsetOutboundBinding(BindingDescriptor binding)Set the outbound binding to use for the error response.voidsetRelyingPartyContextLookupStrategy(Function<ProfileRequestContext,RelyingPartyContext> strategy)Set the relying party context lookup strategy.-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
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 Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
bindingContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,SAMLBindingContext> bindingContextLookupStrategy
Strategy function for access toSAMLBindingContextto populate.
-
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy
Relying party context lookup strategy.
-
outboundBinding
@NonnullAfterInit private BindingDescriptor outboundBinding
Outbound binding to use.
-
peerEntityCtx
@Nullable private SAMLPeerEntityContext peerEntityCtx
TheSAMLPeerEntityContextto base the outbound context on, if any.
-
-
Method Detail
-
setBindingContextLookupStrategy
public void setBindingContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLBindingContext> strategy)Set lookup strategy forSAMLBindingContextto populate.- Parameters:
strategy- lookup strategy
-
setRelyingPartyContextLookupStrategy
public void setRelyingPartyContextLookupStrategy(@Nonnull Function<ProfileRequestContext,RelyingPartyContext> strategy)Set the relying party context lookup strategy.- Parameters:
strategy- lookup strategy
-
setOutboundBinding
public void setOutboundBinding(@Nonnull @NotEmpty BindingDescriptor binding)
Set the outbound binding to use for the error response.- Parameters:
binding- binding descriptor
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
-