Package com.nimbusds.oauth2.sdk.ciba
Class CIBARequestAcknowledgement
java.lang.Object
com.nimbusds.oauth2.sdk.ciba.CIBAResponse
com.nimbusds.oauth2.sdk.ciba.CIBARequestAcknowledgement
- All Implemented Interfaces:
Message
,Response
,SuccessResponse
Successful CIBA request acknowledgement from an OpenID provider / OAuth 2.0
authorisation server backend authentication endpoint.
Example HTTP response:
HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store { "auth_req_id": "1c266114-a1be-4252-8ad1-04986c5b9ac1", "expires_in": 120, "interval": 2 }
Related specifications:
- OpenID Connect CIBA Flow - Core 1.0, section 7.3.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The default minimal wait interval in seconds for polling the token endpoint for the poll and ping delivery modes. -
Constructor Summary
ConstructorsConstructorDescriptionCIBARequestAcknowledgement
(AuthRequestID authRequestID, int expiresIn, Integer minWaitInterval) Creates a new successful CIBA request acknowledgement. -
Method Summary
Modifier and TypeMethodDescriptionReturns the CIBA request ID.int
Returns the expiration time of the CIBA request ID in seconds.Returns the minimum wait interval in seconds for polling the token endpoint for the poll and ping delivery modes.boolean
Checks if the response indicates success.static CIBARequestAcknowledgement
parse
(HTTPResponse httpResponse) Parses a successful CIBA request acknowledgement from the specified HTTP response.static CIBARequestAcknowledgement
parse
(net.minidev.json.JSONObject jsonObject) Parses a successful CIBA request acknowledgement from the specified JSON object.Returns the matching HTTP response.net.minidev.json.JSONObject
Returns a JSON object representation of this CIBA request acknowledgement.Methods inherited from class com.nimbusds.oauth2.sdk.ciba.CIBAResponse
toErrorResponse, toRequestAcknowledgement
-
Field Details
-
DEFAULT_MIN_WAIT_INTERVAL
The default minimal wait interval in seconds for polling the token endpoint for the poll and ping delivery modes.- See Also:
-
-
Constructor Details
-
CIBARequestAcknowledgement
public CIBARequestAcknowledgement(AuthRequestID authRequestID, int expiresIn, Integer minWaitInterval) Creates a new successful CIBA request acknowledgement.- Parameters:
authRequestID
- The CIBA request ID.expiresIn
- The expiration time of the CIBA request ID, in seconds. Must be positive.minWaitInterval
- The minimal wait interval in seconds for polling the token endpoint for the poll or ping delivery modes,null
if not specified.
-
-
Method Details
-
indicatesSuccess
Description copied from interface:Response
Checks if the response indicates success.- Specified by:
indicatesSuccess
in interfaceResponse
- Returns:
true
if the response indicates success, elsefalse
.
-
getAuthRequestID
Returns the CIBA request ID.- Returns:
- The CIBA request ID.
-
getExpiresIn
Returns the expiration time of the CIBA request ID in seconds.- Returns:
- The expiration time in seconds.
-
getMinWaitInterval
Returns the minimum wait interval in seconds for polling the token endpoint for the poll and ping delivery modes.- Returns:
- The interval in seconds,
null
if not specified.
-
toJSONObject
Returns a JSON object representation of this CIBA request acknowledgement.- Returns:
- The JSON object.
-
toHTTPResponse
Description copied from interface:Response
Returns the matching HTTP response.- Specified by:
toHTTPResponse
in interfaceResponse
- Returns:
- The HTTP response.
-
parse
public static CIBARequestAcknowledgement parse(net.minidev.json.JSONObject jsonObject) throws ParseException Parses a successful CIBA request acknowledgement from the specified JSON object.- Parameters:
jsonObject
- The JSON object to parse. Must not benull
.- Returns:
- The CIBA request acknowledgement.
- Throws:
ParseException
- If parsing failed.
-
parse
Parses a successful CIBA request acknowledgement from the specified HTTP response.- Parameters:
httpResponse
- The HTTP response to parse. Must not benull
.- Returns:
- The CIBA request acknowledgement.
- Throws:
ParseException
- If parsing failed.
-