|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nimbusds.oauth2.sdk.id.Identifier
com.nimbusds.oauth2.sdk.token.Token
public abstract class Token
The base abstract class for access and refresh tokens.
Related specifications:
Constructor Summary | |
---|---|
protected |
Token()
Creates a new token with a randomly generated value. |
protected |
Token(int length)
Creates a new token with a randomly generated value of the specified length. |
protected |
Token(String value)
Creates a new token with the specified value. |
Method Summary | |
---|---|
abstract net.minidev.json.JSONObject |
toJSONObject()
Returns the token parameters as a JSON object, as required for the composition of an access token response. |
Methods inherited from class com.nimbusds.oauth2.sdk.id.Identifier |
---|
equals, getValue, hashCode, toJSONString, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Token(String value)
value
- The token value. Must not be null
or empty
string.protected Token(int length)
length
- The number of characters. Must be a positive integer.protected Token()
Method Detail |
---|
public abstract net.minidev.json.JSONObject toJSONObject()
Note that JSONObject implements Map<String,Object>
.
Example:
{ "access_token" : "2YotnFZFEjr1zCsicMWpAA", "token_type" : "example", "expires_in" : 3600, "example_parameter" : "example_value" }
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |