Class ProcessLogoutRequest
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.sp.profile.AbstractAgentRequestAction
net.shibboleth.sp.profile.AbstractAgentAction
net.shibboleth.sp.profile.AbstractApplicationAction
net.shibboleth.sp.saml.saml2.profile.impl.ProcessLogoutRequest
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
Processes an inbound
LogoutRequest from an IdP against the information supplied by
the Agent.
Based on the results, we encode a state token for the Agent to return later to get a response issued to the IdP.
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,EventIds.UNABLE_TO_DECODE- Precondition:
profileRequestContext.ensureInboundMessageContext().getMessage() instanceof org.opensaml.saml.saml2.core.LogoutRequest
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Function<ProfileRequestContext,String> Lookup function for obtaining default NameQualifier.private StringLocal identity of Agent saved for use.private final org.slf4j.LoggerClass logger.private LogoutRequestLogout request message.private DDFOutput message.private ParserPoolParser machinery.NameIDFormats allowing defaulted qualifiers.private Function<ProfileRequestContext,Collection<String>> Lookup strategy for obtaining qualifier-defaultable NameID Formats.private Function<ProfileRequestContext,String> Lookup function for obtaining default SPNameQualifier.private StateManagerState manager to issue token with.static final String"token" value prefix. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddToken(ProfileRequestContext profileRequestContext, Issuer authority, boolean matched) Generate token for Agent based on logout request and add to output.protected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) private booleanGets whether the request contains theAsynchronousextension.private booleanrequestMatchesSession(ProfileRequestContext profileRequestContext, Issuer issuer, NameID sessionNameID) Determines whethe theNameIDand optionalSessionIndexin theLogoutRequeststrongly match the values preserved for the session.voidSet the lookup strategy to obtain the default IdP NameQualifier.voidsetParserPool(ParserPool pool) Sets theParserPoolto parse session data with.voidsetQualifiedNameIDFormatsLookupStrategy(Function<ProfileRequestContext, Collection<String>> strategy) Set the lookup strategy for theNameIDFormats to allow defaulted qualifiers.voidSet the lookup strategy to obtain the default SPNameQualifier.voidsetStateManager(StateManager manager) Sets theStateManagerto issue token with.Methods inherited from class net.shibboleth.sp.profile.AbstractApplicationAction
ensureApplication, getApplicationMethods inherited from class net.shibboleth.sp.profile.AbstractAgentAction
ensureAgent, getAgentMethods inherited from class net.shibboleth.sp.profile.AbstractAgentRequestAction
ensureAgentRequestContext, getAgentRequestContext, setAgentRequestContextLookupStrategyMethods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
TOKEN_PREFIX
"token" value prefix.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
parserPool
Parser machinery. -
stateManager
State manager to issue token with. -
qualifiedNameIDFormatsLookupStrategy
@Nonnull private Function<ProfileRequestContext,Collection<String>> qualifiedNameIDFormatsLookupStrategyLookup strategy for obtaining qualifier-defaultable NameID Formats. -
assertingPartyLookupStrategy
Lookup function for obtaining default NameQualifier. -
relyingPartyLookupStrategy
Lookup function for obtaining default SPNameQualifier. -
qualifiedNameIDFormats
NameIDFormats allowing defaulted qualifiers. -
logoutRequest
Logout request message. -
output
Output message. -
localIssuer
Local identity of Agent saved for use.
-
-
Constructor Details
-
ProcessLogoutRequest
public ProcessLogoutRequest()Constructor.
-
-
Method Details
-
setStateManager
Sets theStateManagerto issue token with.- Parameters:
manager- state manager
-
setQualifiedNameIDFormatsLookupStrategy
public void setQualifiedNameIDFormatsLookupStrategy(@Nonnull Function<ProfileRequestContext, Collection<String>> strategy) Set the lookup strategy for theNameIDFormats to allow defaulted qualifiers.- Parameters:
strategy- lookup strategy
-
setAssertingPartyLookupStrategy
public void setAssertingPartyLookupStrategy(@Nonnull Function<ProfileRequestContext, String> strategy) Set the lookup strategy to obtain the default IdP NameQualifier.- Parameters:
strategy- lookup strategy
-
setRelyingPartyLookupStrategy
Set the lookup strategy to obtain the default SPNameQualifier.- Parameters:
strategy- lookup strategy
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractApplicationAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-
requestMatchesSession
private boolean requestMatchesSession(@Nonnull ProfileRequestContext profileRequestContext, @Nullable Issuer issuer, @Nullable NameID sessionNameID) Determines whethe theNameIDand optionalSessionIndexin theLogoutRequeststrongly match the values preserved for the session.- Parameters:
profileRequestContext- profile request contextissuer- logout request issuersessionNameID- session-preserved NameID- Returns:
- true iff the logout request strongly matched
-
isAsynchronous
private boolean isAsynchronous()Gets whether the request contains theAsynchronousextension.- Returns:
- true iff the request contains the extension
-
addToken
private void addToken(@Nonnull ProfileRequestContext profileRequestContext, @Nullable Issuer authority, boolean matched) Generate token for Agent based on logout request and add to output.The token tracks the request ID and the issuer.
- Parameters:
profileRequestContext- profile request contextauthority- issuer of requestmatched- matched signal