Class SOAPLogoutRequest
- 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.saml2.profile.impl.SOAPLogoutRequest
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class SOAPLogoutRequest extends AbstractProfileAction
Profile action that propagates a preparedLogoutRequestmessage to an SP via the SOAP binding, encapsulating SOAP pipeline construction and execution.The outbound message is pulled from the
ProfileRequestContextto allow the surrounding flow to remain largely SOAP-unaware.Success or failure is reflected in a
LogoutPropagationContextaccessed via a lookup strategy.The response message is also stored off in the inbound message context.
- Since:
- 4.0.0
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,EventIds.INVALID_MSG_CTX,EventIds.INVALID_MESSAGE,EventIds.IO_ERROR- Postcondition:
LogoutPropagationContext.getResult()reflects the status of the logout attempt., profileRequestContext.getInboundMessageContext().getMessage() is populated if a response is obtained.
-
-
Field Summary
Fields Modifier and Type Field Description private Function<ProfileRequestContext,SAMLEndpointContext>endpointContextLookupStrategyStrategy function for access toSAMLEndpointContextto retrieve address from.private SAMLEndpointContextepContextEndpoint context to determine destination address.private org.slf4j.LoggerlogClass logger.private LogoutRequestlogoutRequestLogoutRequest to process.private Function<ProfileRequestContext,LogoutRequest>logoutRequestLookupStrategyLookup strategy forLogoutRequestto process.private SAMLMetadataContextmdContextOptional metadata for use in SOAP client.private Function<ProfileRequestContext,SAMLMetadataContext>metadataContextLookupStrategyStrategy function for access toSAMLMetadataContextfor input to SOAP client.private LogoutPropagationContextpropagationContextLogoutPropagationContext.private Function<ProfileRequestContext,LogoutPropagationContext>propagationContextLookupStrategyLookup strategy for context in which to report result.private SOAPClientsoapClientSOAP client.private StringsoapPipelineNameThe SOAP client message pipeline name.
-
Constructor Summary
Constructors Constructor Description SOAPLogoutRequest()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()protected booleandoPreExecute(ProfileRequestContext profileRequestContext)private voidhandleResponse(ProfileRequestContext profileRequestContext, LogoutResponse response)Turn status from response into an appropriate result.voidsetEndpointContextLookupStrategy(Function<ProfileRequestContext,SAMLEndpointContext> strategy)Set lookup strategy forSAMLEndpointContextto read from.voidsetLogoutRequestLookupStrategy(Function<ProfileRequestContext,LogoutRequest> strategy)Set the lookup strategy for theLogoutRequestto send.voidsetMetadataContextLookupStrategy(Function<ProfileRequestContext,SAMLMetadataContext> strategy)Set lookup strategy forSAMLMetadataContextfor input to SOAP client.voidsetPropagationContextLookupStrategy(Function<ProfileRequestContext,LogoutPropagationContext> strategy)Set the lookup strategy for theLogoutPropagationContextto update.voidsetSOAPClient(SOAPClient client)Set the SOAP client instance.voidsetSOAPPipelineName(String name)Set the name of the specific SOAP client message pipeline to use, for example withPipelineFactoryHttpSOAPClient.-
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.
-
logoutRequestLookupStrategy
@Nonnull private Function<ProfileRequestContext,LogoutRequest> logoutRequestLookupStrategy
Lookup strategy forLogoutRequestto process.
-
propagationContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,LogoutPropagationContext> propagationContextLookupStrategy
Lookup strategy for context in which to report result.
-
metadataContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,SAMLMetadataContext> metadataContextLookupStrategy
Strategy function for access toSAMLMetadataContextfor input to SOAP client.
-
endpointContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,SAMLEndpointContext> endpointContextLookupStrategy
Strategy function for access toSAMLEndpointContextto retrieve address from.
-
soapClient
@NonnullAfterInit private SOAPClient soapClient
SOAP client.
-
soapPipelineName
@Nullable @NotEmpty private String soapPipelineName
The SOAP client message pipeline name.
-
logoutRequest
@Nullable private LogoutRequest logoutRequest
LogoutRequest to process.
-
propagationContext
@Nullable private LogoutPropagationContext propagationContext
LogoutPropagationContext.
-
mdContext
@Nullable private SAMLMetadataContext mdContext
Optional metadata for use in SOAP client.
-
epContext
@Nullable private SAMLEndpointContext epContext
Endpoint context to determine destination address.
-
-
Method Detail
-
setLogoutRequestLookupStrategy
public void setLogoutRequestLookupStrategy(@Nonnull Function<ProfileRequestContext,LogoutRequest> strategy)Set the lookup strategy for theLogoutRequestto send.- Parameters:
strategy- lookup strategy
-
setPropagationContextLookupStrategy
public void setPropagationContextLookupStrategy(@Nonnull Function<ProfileRequestContext,LogoutPropagationContext> strategy)Set the lookup strategy for theLogoutPropagationContextto update.- Parameters:
strategy- lookup strategy
-
setMetadataContextLookupStrategy
public void setMetadataContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLMetadataContext> strategy)Set lookup strategy forSAMLMetadataContextfor input to SOAP client.- Parameters:
strategy- lookup strategy
-
setEndpointContextLookupStrategy
public void setEndpointContextLookupStrategy(@Nonnull Function<ProfileRequestContext,SAMLEndpointContext> strategy)Set lookup strategy forSAMLEndpointContextto read from.- Parameters:
strategy- lookup strategy
-
setSOAPClient
public void setSOAPClient(@Nonnull SOAPClient client)Set the SOAP client instance.- Parameters:
client- the SOAP client
-
setSOAPPipelineName
public void setSOAPPipelineName(@Nullable @NotEmpty String name)
Set the name of the specific SOAP client message pipeline to use, for example withPipelineFactoryHttpSOAPClient.- Parameters:
name- the pipeline name, or null
-
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
-
handleResponse
private void handleResponse(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull LogoutResponse response)Turn status from response into an appropriate result.- Parameters:
profileRequestContext- current profile request contextresponse- message to examine
-
-