com.nimbusds.oauth2.sdk
Class TokenResponse

java.lang.Object
  extended by 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:

Author:
Vladimir Dzhuvinov

Constructor Summary
TokenResponse()
           
 
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
 
Methods inherited from interface com.nimbusds.oauth2.sdk.Response
toHTTPResponse
 

Constructor Detail

TokenResponse

public TokenResponse()
Method Detail

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.