public static class Auth.TokenRequest extends Auth.TokenParams
Auth.requestToken(io.ably.lib.rest.Auth.TokenParams, io.ably.lib.rest.Auth.AuthOptions).| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
keyName
The name of the key against which this request is made.
|
java.lang.String |
mac
The Message Authentication Code for this request.
|
java.lang.String |
nonce
A cryptographically secure random string of at least 16 characters, used to ensure the TokenRequest cannot be reused.
|
capability, clientId, timestamp, ttl| Constructor and Description |
|---|
TokenRequest() |
TokenRequest(Auth.TokenParams params) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asJson()
Convert a TokenParams into a JSON string.
|
com.google.gson.JsonObject |
asJsonElement()
Convert a TokenParams into a JSON object.
|
boolean |
equals(java.lang.Object obj)
Check equality of a TokenRequest
|
static Auth.TokenRequest |
fromJSON(com.google.gson.JsonObject json)
Deprecated.
use fromJsonElement(JsonObject json) instead
|
static Auth.TokenRequest |
fromJson(java.lang.String json)
A static factory method to create a TokenRequest object from a deserialized TokenRequest-like object
or a JSON stringified TokenRequest object.
|
static Auth.TokenRequest |
fromJsonElement(com.google.gson.JsonObject json)
A static factory method to create a TokenRequest object from a deserialized TokenRequest-like object
or a JSON stringified TokenRequest object.
|
asMappublic java.lang.String keyName
Spec: TE2
public java.lang.String nonce
Spec: TE2
public java.lang.String mac
Spec: TE2
public TokenRequest()
public TokenRequest(Auth.TokenParams params)
@Deprecated public static Auth.TokenRequest fromJSON(com.google.gson.JsonObject json)
Spec: TE6
json - A deserialized TokenRequest-like object or a JSON stringified TokenRequest object to create a TokenRequest.public static Auth.TokenRequest fromJsonElement(com.google.gson.JsonObject json)
Spec: TE6
json - A deserialized TokenRequest-like object or a JSON stringified TokenRequest object to create a TokenRequest.public static Auth.TokenRequest fromJson(java.lang.String json)
Spec: TE6
json - A deserialized TokenRequest-like object or a JSON stringified TokenRequest object to create a TokenRequest.public com.google.gson.JsonObject asJsonElement()
public java.lang.String asJson()
public boolean equals(java.lang.Object obj)
equals in class Auth.TokenParamsobj -