@Immutable public class ClientRegistrationErrorResponse extends ClientRegistrationResponse implements ErrorResponse
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:
| Constructor and Description |
|---|
ClientRegistrationErrorResponse(ErrorObject error)
Creates a new client registration error response.
|
| Modifier and Type | Method and Description |
|---|---|
ErrorObject |
getErrorObject()
Gets the error associated with the error response.
|
static Set<ErrorObject> |
getStandardErrors()
Gets the standard errors for a client registration error response.
|
boolean |
indicatesSuccess()
Checks if the response indicates success.
|
static ClientRegistrationErrorResponse |
parse(HTTPResponse httpResponse)
Parses a client registration error response from the specified HTTP
response.
|
HTTPResponse |
toHTTPResponse()
Returns the HTTP response for this client registration error
response.
|
public ClientRegistrationErrorResponse(ErrorObject error)
error - The error. Should match one of the
standard errors for a client
registration error response. Must not be null.public static Set<ErrorObject> getStandardErrors()
public boolean indicatesSuccess()
ResponseindicatesSuccess in interface Responsetrue if the response indicates success, else
false.public ErrorObject getErrorObject()
ErrorResponsegetErrorObject in interface ErrorResponsenull if none.public HTTPResponse toHTTPResponse()
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."
}
toHTTPResponse in interface Responsepublic static ClientRegistrationErrorResponse parse(HTTPResponse httpResponse) throws ParseException
Note: The HTTP status code is not checked for matching the error code semantics.
httpResponse - The HTTP response to parse. Its status code must
not be 200 (OK). Must not be null.ParseException - If the HTTP response couldn't be parsed to a
client registration error response.Copyright © 2016 Connect2id Ltd.. All Rights Reserved.