Class ClientRegistrationErrorResponse

java.lang.Object
com.nimbusds.oauth2.sdk.client.ClientRegistrationResponse
com.nimbusds.oauth2.sdk.client.ClientRegistrationErrorResponse
All Implemented Interfaces:
ErrorResponse, Message, Response

Client registration error response.

Standard errors:

Example HTTP response:

 HTTP/1.1 400 Bad Request
 Content-Type: application/json
 Cache-Control: no-store
 Pragma: no-cache

 {
  "error":"invalid_redirect_uri",
  "error_description":"The redirection URI of http://sketchy.example.com is not allowed for this server."
 }
 

Related specifications:

  • OAuth 2.0 Dynamic Client Registration Protocol (RFC 7591)
  • OAuth 2.0 Bearer Token Usage (RFC 6750)
  • Constructor Details

  • Method Details

    • getStandardErrors

      public static Set<ErrorObject> getStandardErrors()
      Gets the standard errors for a client registration error response.
      Returns:
      The standard errors, as a read-only set.
    • 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.
    • getErrorObject

      Description copied from interface: ErrorResponse
      Gets the error associated with the error response.
      Specified by:
      getErrorObject in interface ErrorResponse
      Returns:
      The error, null if none.
    • toHTTPResponse

      Returns the HTTP response for this client registration error response.

      Example HTTP response:

       HTTP/1.1 400 Bad Request
       Content-Type: application/json
       Cache-Control: no-store
       Pragma: no-cache
      
       {
        "error":"invalid_redirect_uri",
        "error_description":"The redirection URI of https://sketchy.example.com is not allowed for this server."
       }
       
      Specified by:
      toHTTPResponse in interface Response
      Returns:
      The HTTP response.
    • parse

      Parses a client registration error response from the specified HTTP response.

      Note: The HTTP status code is not checked for matching the error code semantics.

      Parameters:
      httpResponse - The HTTP response to parse. Its status code must not be 200 (OK). Must not be null.
      Returns:
      The client registration error response.
      Throws:
      ParseException - If the HTTP response couldn't be parsed to a client registration error response.