Class ProcessLogoutRequest

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public class ProcessLogoutRequest extends AbstractApplicationAction
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 Details

  • Constructor Details

    • ProcessLogoutRequest

      public ProcessLogoutRequest()
      Constructor.
  • Method Details

    • setParserPool

      public void setParserPool(@Nonnull ParserPool pool)
      Sets the ParserPool to parse session data with.
      Parameters:
      pool - parser pool
    • setStateManager

      public void setStateManager(@Nonnull StateManager manager)
      Sets the StateManager to issue token with.
      Parameters:
      manager - state manager
    • setQualifiedNameIDFormatsLookupStrategy

      public void setQualifiedNameIDFormatsLookupStrategy(@Nonnull Function<ProfileRequestContext,Collection<String>> strategy)
      Set the lookup strategy for the NameID Formats 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

      public void setRelyingPartyLookupStrategy(@Nonnull Function<ProfileRequestContext,String> strategy)
      Set the lookup strategy to obtain the default SPNameQualifier.
      Parameters:
      strategy - lookup strategy
    • doInitialize

      protected void doInitialize() throws ComponentInitializationException
      Overrides:
      doInitialize in class AbstractInitializableComponent
      Throws:
      ComponentInitializationException
    • doPreExecute

      protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
      Overrides:
      doPreExecute in class AbstractApplicationAction
    • doExecute

      protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
      Overrides:
      doExecute in class AbstractProfileAction
    • requestMatchesSession

      private boolean requestMatchesSession(@Nonnull ProfileRequestContext profileRequestContext, @Nullable Issuer issuer, @Nullable NameID sessionNameID)
      Determines whethe the NameID and optional SessionIndex in the LogoutRequest strongly match the values preserved for the session.
      Parameters:
      profileRequestContext - profile request context
      issuer - logout request issuer
      sessionNameID - session-preserved NameID
      Returns:
      true iff the logout request strongly matched
    • isAsynchronous

      private boolean isAsynchronous()
      Gets whether the request contains the Asynchronous extension.
      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 context
      authority - issuer of request
      matched - matched signal