@Immutable public class OIDCTokenErrorResponse extends TokenErrorResponse implements OIDCTokenResponse
Standard token errors:
OAuth2Error.INVALID_REQUEST
OAuth2Error.INVALID_CLIENT
OAuth2Error.INVALID_GRANT
OAuth2Error.UNAUTHORIZED_CLIENT
OAuth2Error.UNSUPPORTED_GRANT_TYPE
OAuth2Error.INVALID_SCOPE
Example HTTP response:
HTTP/1.1 400 Bad Request Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "error": "invalid_request" }
Related specifications:
Constructor and Description |
---|
OIDCTokenErrorResponse(ErrorObject error)
Creates a new OpenID Connect token error response.
|
Modifier and Type | Method and Description |
---|---|
static OIDCTokenErrorResponse |
parse(HTTPResponse httpResponse)
Parses an OpenID Connect token error response from the specified
HTTP response.
|
static OIDCTokenErrorResponse |
parse(net.minidev.json.JSONObject jsonObject)
Parses an OpenID Connect token error response from the specified
JSON object.
|
getErrorObject, getStandardErrors, toHTTPResponse, toJSONObject
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toHTTPResponse
public OIDCTokenErrorResponse(ErrorObject error)
error
- The error. Should match one of the
standard errors
for a token
error response. Must not be null
.public static OIDCTokenErrorResponse parse(net.minidev.json.JSONObject jsonObject) throws ParseException
jsonObject
- The JSON object to parse. Its status code must not
be 200 (OK). Must not be null
.ParseException
- If the JSON object couldn't be parsed to an
OpenID Connect token error response.public static OIDCTokenErrorResponse parse(HTTPResponse httpResponse) throws ParseException
httpResponse
- The HTTP response to parse. Its status code must
not be 200 (OK). Must not be null
.ParseException
- If the JSON object couldn't be parsed to an
OpenID Connect token error response.Copyright © 2013 NimbusDS. All Rights Reserved.