Class PushedAuthorizationSuccessResponse

java.lang.Object
com.nimbusds.oauth2.sdk.PushedAuthorizationResponse
com.nimbusds.oauth2.sdk.PushedAuthorizationSuccessResponse
All Implemented Interfaces:
Message, Response

Pushed authorisation success response.

Example HTTP response:

 HTTP/1.1 201 Created
 Date: Tue, 2 May 2017 15:22:31 GMT
 Content-Type: application/json

 {
   "request_uri" : "urn:example:bwc4JK-ESC0w8acc191e-Y1LTC2",
   "expires_in"  : 3600
 }
 

Related specifications:

  • OAuth 2.0 Pushed Authorization Requests (RFC 9126)
  • Constructor Details

    • PushedAuthorizationSuccessResponse

      public PushedAuthorizationSuccessResponse(URI requestURI, long lifetime)
      Creates a new pushed authorisation success response.
      Parameters:
      requestURI - The request URI. Must not be null.
      lifetime - The request lifetime, in seconds. Must be a positive integer.
  • Method Details

    • getRequestURI

      public URI getRequestURI()
      Returns the request URI.
      Returns:
      The request URI.
    • getLifetime

      public long getLifetime()
      Returns the request lifetime.
      Returns:
      The request lifetime, in seconds.
    • indicatesSuccess

      public boolean indicatesSuccess()
      Description copied from interface: Response
      Checks if the response indicates success.
      Returns:
      true if the response indicates success, else false.
    • toJSONObject

      public net.minidev.json.JSONObject toJSONObject()
      Returns a JSON object representation of this pushed authorisation success response.

      Example JSON object:

       {
         "request_uri": "urn:example:bwc4JK-ESC0w8acc191e-Y1LTC2",
         "expires_in": 3600
       }
       
      Returns:
      The JSON object.
    • toHTTPResponse

      Description copied from interface: Response
      Returns the matching HTTP response.
      Returns:
      The HTTP response.
    • parse

      public static PushedAuthorizationSuccessResponse parse(net.minidev.json.JSONObject jsonObject) throws ParseException
      Parses pushed authorisation success response from the specified JSON object.
      Parameters:
      jsonObject - The JSON object to parse. Must not be null.
      Returns:
      The pushed authorisation success response.
      Throws:
      ParseException - If the JSON object couldn't be parsed to a pushed authorisation success response.
    • parse

      Parses a pushed authorisation success response from the specified HTTP response.
      Parameters:
      httpResponse - The HTTP response. Must not be null.
      Returns:
      The pushed authorisation success response.
      Throws:
      ParseException - If the HTTP response couldn't be parsed to a pushed authorisation success response.