Class BackChannelLogoutRequest

  • All Implemented Interfaces:
    Message, Request

    @Immutable
    public class BackChannelLogoutRequest
    extends AbstractRequest
    Back-channel logout request initiated by an OpenID provider (OP).

    Example HTTP request:

     POST /backchannel_logout HTTP/1.1
     Host: rp.example.org
     Content-Type: application/x-www-form-urlencoded
    
     logout_token=eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
     

    Related specifications:

    • OpenID Connect Back-Channel Logout 1.0, section 2.5 (draft 04).
    • Constructor Detail

      • BackChannelLogoutRequest

        public BackChannelLogoutRequest​(URI uri,
                                        com.nimbusds.jwt.JWT logoutToken)
        Creates a new back-channel logout request.
        Parameters:
        uri - The back-channel logout URI. May be null if the toHTTPRequest() method will not be used.
        logoutToken - The logout token. Must be signed, or signed and encrypted. Must not be null.
    • Method Detail

      • getLogoutToken

        public com.nimbusds.jwt.JWT getLogoutToken()
        Returns the logout token.
        Returns:
        The logout token.
      • toParameters

        public Map<String,​List<String>> toParameters()
        Returns the parameters for this back-channel logout request.

        Example parameters:

         logout_token=eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
         
        Returns:
        The parameters.
      • toHTTPRequest

        public HTTPRequest toHTTPRequest()
        Description copied from interface: Request
        Returns the matching HTTP request.
        Returns:
        The HTTP request.
      • parse

        public static BackChannelLogoutRequest parse​(Map<String,​List<String>> params)
                                              throws ParseException
        Parses a back-channel logout request from the specified request body parameters.

        Example parameters:

         logout_token = eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
         
        Parameters:
        params - The parameters. Must not be null.
        Returns:
        The back-channel logout request.
        Throws:
        ParseException - If the parameters couldn't be parsed to a back-channel logout request.
      • parse

        public static BackChannelLogoutRequest parse​(URI uri,
                                                     Map<String,​List<String>> params)
                                              throws ParseException
        Parses a back-channel logout request from the specified URI and request body parameters.

        Example parameters:

         logout_token = eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
         
        Parameters:
        uri - The back-channel logout URI. May be null if the toHTTPRequest() method will not be used.
        params - The parameters. Must not be null.
        Returns:
        The back-channel logout request.
        Throws:
        ParseException - If the parameters couldn't be parsed to a back-channel logout request.
      • parse

        public static BackChannelLogoutRequest parse​(HTTPRequest httpRequest)
                                              throws ParseException
        Parses a back-channel logout request from the specified HTTP request.

        Example HTTP request (POST):

         POST /backchannel_logout HTTP/1.1
         Host: rp.example.org
         Content-Type: application/x-www-form-urlencoded
        
         logout_token=eyJhbGci ... .eyJpc3Mi ... .T3BlbklE ...
         
        Parameters:
        httpRequest - The HTTP request. Must not be null.
        Returns:
        The back-channel logout request.
        Throws:
        ParseException - If the HTTP request couldn't be parsed to a back-channel logout request.