AccessTokenResponse, TokenErrorResponsepublic abstract class TokenResponse extends Object implements Response
Related specifications:
| Constructor | Description |
|---|---|
TokenResponse() |
| Modifier and Type | Method | Description |
|---|---|---|
static TokenResponse |
parse(HTTPResponse httpResponse) |
Parses a token response from the specified HTTP response.
|
static TokenResponse |
parse(net.minidev.json.JSONObject jsonObject) |
Parses a token response from the specified JSON object.
|
TokenErrorResponse |
toErrorResponse() |
Casts this response to a token error response.
|
AccessTokenResponse |
toSuccessResponse() |
Casts this response to an access token response.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitindicatesSuccess, toHTTPResponsepublic TokenResponse()
public AccessTokenResponse toSuccessResponse()
public TokenErrorResponse toErrorResponse()
public static TokenResponse parse(net.minidev.json.JSONObject jsonObject) throws ParseException
jsonObject - The JSON object to parse. Must not be
null.ParseException - If the JSON object couldn't be parsed to a
token response.public static TokenResponse parse(HTTPResponse httpResponse) throws ParseException
httpResponse - The HTTP response. Must not be null.ParseException - If the HTTP response couldn't be parsed to a
token response.Copyright © 2018 Connect2id Ltd.. All rights reserved.