Package io.ably.lib.rest
Class Auth.TokenRequest
- java.lang.Object
-
- io.ably.lib.rest.Auth.TokenParams
-
- io.ably.lib.rest.Auth.TokenRequest
-
- Enclosing class:
- Auth
public static class Auth.TokenRequest extends Auth.TokenParams
A class providing parameters of a token request.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringkeyNameThe keyName of the key against which this request is made.java.lang.StringmacThe Message Authentication Code for this request.java.lang.StringnonceAn opaque nonce string of at least 16 characters to ensure uniqueness of this request.-
Fields inherited from class io.ably.lib.rest.Auth.TokenParams
capability, clientId, timestamp, ttl
-
-
Constructor Summary
Constructors Constructor Description TokenRequest()TokenRequest(Auth.TokenParams params)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringasJson()Convert a TokenParams into a JSON string.com.google.gson.JsonObjectasJsonElement()Convert a TokenParams into a JSON object.booleanequals(java.lang.Object obj)Check equality of a TokenRequeststatic Auth.TokenRequestfromJson(java.lang.String json)Convert a string JSON response body to a TokenParams.static Auth.TokenRequestfromJSON(com.google.gson.JsonObject json)Deprecated.static Auth.TokenRequestfromJsonElement(com.google.gson.JsonObject json)Convert a parsed JSON response body to a TokenParams.-
Methods inherited from class io.ably.lib.rest.Auth.TokenParams
asMap
-
-
-
-
Field Detail
-
keyName
public java.lang.String keyName
The keyName of the key against which this request is made.
-
nonce
public java.lang.String nonce
An opaque nonce string of at least 16 characters to ensure uniqueness of this request. Any subsequent request using the same nonce will be rejected.
-
mac
public java.lang.String mac
The Message Authentication Code for this request. See the Ably Authentication documentation for more details.
-
-
Constructor Detail
-
TokenRequest
public TokenRequest()
-
TokenRequest
public TokenRequest(Auth.TokenParams params)
-
-
Method Detail
-
fromJSON
@Deprecated public static Auth.TokenRequest fromJSON(com.google.gson.JsonObject json)
Deprecated.Convert a JSON serialisation to a TokenParams. Deprecated: use fromJson() instead- Parameters:
json-- Returns:
-
fromJsonElement
public static Auth.TokenRequest fromJsonElement(com.google.gson.JsonObject json)
Convert a parsed JSON response body to a TokenParams.- Parameters:
json-- Returns:
-
fromJson
public static Auth.TokenRequest fromJson(java.lang.String json)
Convert a string JSON response body to a TokenParams. Spec: TE6- Parameters:
json-- Returns:
-
asJsonElement
public com.google.gson.JsonObject asJsonElement()
Convert a TokenParams into a JSON object.
-
asJson
public java.lang.String asJson()
Convert a TokenParams into a JSON string.
-
equals
public boolean equals(java.lang.Object obj)
Check equality of a TokenRequest- Overrides:
equalsin classAuth.TokenParams- Parameters:
obj-
-
-