Class CIBARequestAcknowledgement

java.lang.Object
com.nimbusds.oauth2.sdk.ciba.CIBAResponse
com.nimbusds.oauth2.sdk.ciba.CIBARequestAcknowledgement
All Implemented Interfaces:
Message, Response, SuccessResponse

@Immutable public class CIBARequestAcknowledgement extends CIBAResponse implements 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 Details

  • 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

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

      Returns the CIBA request ID.
      Returns:
      The CIBA request ID.
    • getExpiresIn

      public int 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

      public net.minidev.json.JSONObject 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 interface Response
      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 be null.
      Returns:
      The CIBA request acknowledgement.
      Throws:
      ParseException - If parsing failed.
    • parse

      public static CIBARequestAcknowledgement parse(HTTPResponse httpResponse) throws ParseException
      Parses a successful CIBA request acknowledgement from the specified HTTP response.
      Parameters:
      httpResponse - The HTTP response to parse. Must not be null.
      Returns:
      The CIBA request acknowledgement.
      Throws:
      ParseException - If parsing failed.