Class RpInitiatedLogoutResponse

java.lang.Object
net.shibboleth.idp.plugin.oidc.op.messaging.impl.RpInitiatedLogoutResponse
All Implemented Interfaces:
Message, Response

public class RpInitiatedLogoutResponse extends Object implements Response
A Nimbus Response implementation representing a post front-channel logout redirection message that is sent to the RP's post front-channel logout URI endpoint. If the URI is null, an empty response with OK status is returned.
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Class logger.
    • postLogoutRedirectionUri

      @Nullable private final String postLogoutRedirectionUri
      The post front-channel logout redirection endpoint.
    • state

      @Nullable private final String state
      The optional state value.
  • Constructor Details

    • RpInitiatedLogoutResponse

      public RpInitiatedLogoutResponse(@Nullable String uri)
      Constructor.
      Parameters:
      uri - The post front-channel logout redirection endpoint.
    • RpInitiatedLogoutResponse

      public RpInitiatedLogoutResponse(@Nullable String uri, @Nullable String relayState)
      Constructor.
      Parameters:
      uri - The post front-channel logout redirection endpoint.
      relayState - The optional state -parameter value.
  • Method Details

    • indicatesSuccess

      public boolean indicatesSuccess()
      Specified by:
      indicatesSuccess in interface Response
    • toHTTPResponse

      public HTTPResponse toHTTPResponse()
      Returns an HTTP response for this logout response. If a post logout redirect URI was set, then the response contains 302 redirection to it optionally with the state parameter. If the URI was not set, then the response simpy contains HTTP 200 OK without any content.

      Example HTTP response:

       HTTP/1.1 302 Found
       Location: http://example.org/logout?state=1234567890ABCDEFG
       
      Specified by:
      toHTTPResponse in interface Response
      Returns:
      An HTTP response for this message.
    • serializeParameters

      @Nonnull protected String serializeParameters(@Nonnull String prefix) throws UnsupportedEncodingException
      URL-encode the iss and sid -parameters to the given prefix if parameter values have been set.
      Parameters:
      prefix - The prefix/URL for which to add the parameters.
      Returns:
      The given prefix possibly appended with parameter names and values
      Throws:
      UnsupportedEncodingException - If the parameter values could not be encoded with UTF-8