Package 

Class Auth.TokenRequest

    • Method Summary

      Modifier and Type Method Description
      static Auth.TokenRequest fromJSON(JsonObject json) A static factory method to create a TokenRequest object from a deserialized TokenRequest-like objector a JSON stringified TokenRequest object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenRequest object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenRequest object,Ably ensures that all fields are consistently serialized and deserialized across platforms.
      static Auth.TokenRequest fromJsonElement(JsonObject json) A static factory method to create a TokenRequest object from a deserialized TokenRequest-like objector a JSON stringified TokenRequest object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenRequest object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenRequest object,Ably ensures that all fields are consistently serialized and deserialized across platforms.
      static Auth.TokenRequest fromJson(String json) A static factory method to create a TokenRequest object from a deserialized TokenRequest-like objector a JSON stringified TokenRequest object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenRequest object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenRequest object,Ably ensures that all fields are consistently serialized and deserialized across platforms.
      JsonObject asJsonElement() Convert a TokenParams into a JSON object.
      String asJson() Convert a TokenParams into a JSON string.
      boolean equals(Object obj) Check equality of a TokenRequest
      • Methods inherited from class io.ably.lib.rest.Auth.TokenParams

        asMap
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Auth.TokenRequest

        Auth.TokenRequest()
    • Method Detail

      • fromJSON

        @Deprecated() static Auth.TokenRequest fromJSON(JsonObject json)

        A static factory method to create a TokenRequest object from a deserialized TokenRequest-like objector a JSON stringified TokenRequest object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenRequest object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenRequest object,Ably ensures that all fields are consistently serialized and deserialized across platforms.

        Spec: TE6

        Parameters:
        json - A deserialized TokenRequest-like object or a JSON stringified TokenRequest object to create a TokenRequest.
      • fromJsonElement

         static Auth.TokenRequest fromJsonElement(JsonObject json)

        A static factory method to create a TokenRequest object from a deserialized TokenRequest-like objector a JSON stringified TokenRequest object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenRequest object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenRequest object,Ably ensures that all fields are consistently serialized and deserialized across platforms.

        Spec: TE6

        Parameters:
        json - A deserialized TokenRequest-like object or a JSON stringified TokenRequest object to create a TokenRequest.
      • fromJson

         static Auth.TokenRequest fromJson(String json)

        A static factory method to create a TokenRequest object from a deserialized TokenRequest-like objector a JSON stringified TokenRequest object.This method is provided to minimize bugs as a result of differing types by platform for fields such as timestamp or ttl.For example, in Ruby ttl in the TokenRequest object is exposed in seconds as that is idiomatic for the language,yet when serialized to JSON using to_json it is automatically converted to the Ably standard which is milliseconds.By using the fromJson() method when constructing a TokenRequest object,Ably ensures that all fields are consistently serialized and deserialized across platforms.

        Spec: TE6

        Parameters:
        json - A deserialized TokenRequest-like object or a JSON stringified TokenRequest object to create a TokenRequest.
      • asJsonElement

         JsonObject asJsonElement()

        Convert a TokenParams into a JSON object.

      • asJson

         String asJson()

        Convert a TokenParams into a JSON string.

      • equals

         boolean equals(Object obj)

        Check equality of a TokenRequest