com.nimbusds.oauth2.sdk
Class TokenResponse
java.lang.Object
com.nimbusds.oauth2.sdk.TokenResponse
- All Implemented Interfaces:
- Message, Response
- Direct Known Subclasses:
- AccessTokenResponse, TokenErrorResponse
public abstract class TokenResponse
- extends Object
- implements Response
Token endpoint response. This is the base abstract class for access token
(success) and token error responses.
Related specifications:
- OAuth 2.0 (RFC 6749), section 3.2.
- Version:
- $version$ (2013-01-28)
- Author:
- Vladimir Dzhuvinov
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenResponse
public TokenResponse()
parse
public static TokenResponse parse(net.minidev.json.JSONObject jsonObject)
throws ParseException
- Parses a token response from the specified JSON object.
- Parameters:
jsonObject
- The JSON object to parse. Must not be
- Returns:
- The access token or token error response.
- Throws:
ParseException
- If the JSON object couldn't be parsed to a
token response.
parse
public static TokenResponse parse(HTTPResponse httpResponse)
throws ParseException
- Parses a token response from the specified HTTP response.
- Parameters:
httpResponse
- The HTTP response. Must not be null
.
- Returns:
- The access token or token error response.
- Throws:
ParseException
- If the HTTP response couldn't be parsed to a
token response.
Copyright © 2013 NimbusDS. All Rights Reserved.