Package com.nimbusds.oauth2.sdk
Class PushedAuthorizationSuccessResponse
java.lang.Object
com.nimbusds.oauth2.sdk.PushedAuthorizationResponse
com.nimbusds.oauth2.sdk.PushedAuthorizationSuccessResponse
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 Summary
ConstructorsConstructorDescriptionPushedAuthorizationSuccessResponse(URI requestURI, long lifetime) Creates a new pushed authorisation success response. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the request lifetime.Returns the request URI.booleanChecks if the response indicates success.parse(HTTPResponse httpResponse) Parses a pushed authorisation success response from the specified HTTP response.parse(net.minidev.json.JSONObject jsonObject) Parses pushed authorisation success response from the specified JSON object.Returns the matching HTTP response.net.minidev.json.JSONObjectReturns a JSON object representation of this pushed authorisation success response.Methods inherited from class com.nimbusds.oauth2.sdk.PushedAuthorizationResponse
toErrorResponse, toSuccessResponse
-
Constructor Details
-
PushedAuthorizationSuccessResponse
Creates a new pushed authorisation success response.- Parameters:
requestURI- The request URI. Must not benull.lifetime- The request lifetime, in seconds. Must be a positive integer.
-
-
Method Details
-
getRequestURI
Returns the request URI.- Returns:
- The request URI.
-
getLifetime
Returns the request lifetime.- Returns:
- The request lifetime, in seconds.
-
indicatesSuccess
Description copied from interface:ResponseChecks if the response indicates success.- Returns:
trueif the response indicates success, elsefalse.
-
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:ResponseReturns 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 benull.- Returns:
- The pushed authorisation success response.
- Throws:
ParseException- If the JSON object couldn't be parsed to a pushed authorisation success response.
-
parse
public static PushedAuthorizationSuccessResponse parse(HTTPResponse httpResponse) throws ParseException Parses a pushed authorisation success response from the specified HTTP response.- Parameters:
httpResponse- The HTTP response. Must not benull.- Returns:
- The pushed authorisation success response.
- Throws:
ParseException- If the HTTP response couldn't be parsed to a pushed authorisation success response.
-