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 outbound
MessageContext
and 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>
bindingContextLookupStrategy
Strategy function for access toSAMLBindingContext
to populate.private org.slf4j.Logger
log
Class logger.private BindingDescriptor
outboundBinding
Outbound binding to use.private SAMLPeerEntityContext
peerEntityCtx
TheSAMLPeerEntityContext
to base the outbound context on, if any.private Function<ProfileRequestContext,RelyingPartyContext>
relyingPartyContextLookupStrategy
Relying party context lookup strategy. -
Constructor Summary
Constructors Constructor Description InitializeOutboundMessageContextForError()
Constructor. -
Method Summary
Modifier and Type Method Description protected void
doExecute(ProfileRequestContext profileRequestContext)
protected void
doInitialize()
protected boolean
doPreExecute(ProfileRequestContext profileRequestContext)
void
setBindingContextLookupStrategy(Function<ProfileRequestContext,SAMLBindingContext> strategy)
Set lookup strategy forSAMLBindingContext
to populate.void
setOutboundBinding(BindingDescriptor binding)
Set the outbound binding to use for the error response.void
setRelyingPartyContextLookupStrategy(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 Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
bindingContextLookupStrategy
Strategy function for access toSAMLBindingContext
to populate. -
relyingPartyContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategyRelying party context lookup strategy. -
outboundBinding
Outbound binding to use. -
peerEntityCtx
TheSAMLPeerEntityContext
to base the outbound context on, if any.
-
-
Constructor Details
-
InitializeOutboundMessageContextForError
public InitializeOutboundMessageContextForError()Constructor.
-
-
Method Details
-
setBindingContextLookupStrategy
public void setBindingContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLBindingContext> strategy)Set lookup strategy forSAMLBindingContext
to 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
Set the outbound binding to use for the error response.- Parameters:
binding
- binding descriptor
-
doInitialize
- Overrides:
doInitialize
in classAbstractInitializableComponent
- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecute
in classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecute
in classAbstractProfileAction
-