Class Auth.TokenParams

  • Direct Known Subclasses:
    Auth.TokenRequest
    Enclosing class:
    Auth

    public static class Auth.TokenParams
    extends java.lang.Object
    Defines the properties of an Ably Token.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String capability
      The capabilities associated with this Ably Token.
      java.lang.String clientId
      A client ID, used for identifying this client when publishing messages or for presence purposes.
      long timestamp
      The timestamp of this request as milliseconds since the Unix epoch.
      long ttl
      Requested time to live for the token in milliseconds.
    • Constructor Summary

      Constructors 
      Constructor Description
      TokenParams()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​Param> asMap()
      Internal; convert a TokenParams to a collection of Params
      boolean equals​(java.lang.Object obj)
      Check equality of a TokenParams
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ttl

        public long ttl
        Requested time to live for the token in milliseconds. The default is 60 minutes.

        Spec: RSA9e, TK2a

      • capability

        public java.lang.String capability
        The capabilities associated with this Ably Token. The capabilities value is a JSON-encoded representation of the resource paths and associated operations. Read more about capabilities in the capabilities docs.

        Spec: RSA9f, TK2b

      • clientId

        public java.lang.String clientId
        A client ID, used for identifying this client when publishing messages or for presence purposes. The clientId can be any non-empty string, except it cannot contain a *. This option is primarily intended to be used in situations where the library is instantiated with a key. Note that a clientId may also be implicit in a token used to instantiate the library. An error is raised if a clientId specified here conflicts with the clientId implicit in the token. Find out more about identified clients.

        Spec: TK2c

      • timestamp

        public long timestamp
        The timestamp of this request as milliseconds since the Unix epoch. Timestamps, in conjunction with the nonce, are used to prevent requests from being replayed. timestamp is a "one-time" value, and is valid in a request, but is not validly a member of any default token params such as ClientOptions.defaultTokenParams.

        Spec: RSA9d, Tk2d

    • Constructor Detail

      • TokenParams

        public TokenParams()
    • Method Detail

      • asMap

        public java.util.Map<java.lang.String,​Param> asMap()
        Internal; convert a TokenParams to a collection of Params
        Returns:
      • equals

        public boolean equals​(java.lang.Object obj)
        Check equality of a TokenParams
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj -