Class Auth.AuthOptions

  • Direct Known Subclasses:
    ClientOptions
    Enclosing class:
    Auth

    public static class Auth.AuthOptions
    extends java.lang.Object
    Authentication options when instancing the Ably library
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Auth.TokenCallback authCallback
      A callback to call to obtain a signed TokenRequest, TokenDetails or a token string.
      Param[] authHeaders
      Headers to be included in any request made by the library to the authURL.
      java.lang.String authMethod
      TO3j7: authMethod: The HTTP verb to be used when a request is made by the library to the authUrl.
      Param[] authParams
      Query params to be included in any request made by the library to the authURL.
      java.lang.String authUrl
      A URL to query to obtain a signed TokenRequest, TokenDetails or a token string.
      java.lang.String key
      Full Ably key string as obtained from dashboard.
      boolean queryTime
      This may be set in instances that the library is to sign token requests based on a given key.
      java.lang.String token
      An authentication token issued for this application against a specific key and Auth.TokenParams
      Auth.TokenDetails tokenDetails
      An authentication token issued for this application against a specific key and Auth.TokenParams
      boolean useTokenAuth
      TO3j4: Use token authorization even if no clientId
    • Constructor Summary

      Constructors 
      Constructor Description
      AuthOptions()
      Default constructor
      AuthOptions​(java.lang.String key)
      Convenience constructor, to create an AuthOptions based on the key string obtained from the application dashboard.
    • Method Summary

      • Methods inherited from class java.lang.Object

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

      • authCallback

        public Auth.TokenCallback authCallback
        A callback to call to obtain a signed TokenRequest, TokenDetails or a token string. This enables a client to obtain token requests or tokens from another entity, so tokens can be renewed without the client requiring a key
      • authUrl

        public java.lang.String authUrl
        A URL to query to obtain a signed TokenRequest, TokenDetails or a token string. This enables a client to obtain token request or token from another entity, so tokens can be renewed without the client requiring a key
      • authMethod

        public java.lang.String authMethod
        TO3j7: authMethod: The HTTP verb to be used when a request is made by the library to the authUrl. Defaults to GET, supports GET and POST
      • key

        public java.lang.String key
        Full Ably key string as obtained from dashboard.
      • token

        public java.lang.String token
        An authentication token issued for this application against a specific key and Auth.TokenParams
      • authHeaders

        public Param[] authHeaders
        Headers to be included in any request made by the library to the authURL.
      • authParams

        public Param[] authParams
        Query params to be included in any request made by the library to the authURL.
      • queryTime

        public boolean queryTime
        This may be set in instances that the library is to sign token requests based on a given key. If true, the library will query the Ably system for the current time instead of relying on a locally-available time of day.
      • useTokenAuth

        public boolean useTokenAuth
        TO3j4: Use token authorization even if no clientId
    • Constructor Detail

      • AuthOptions

        public AuthOptions()
        Default constructor
      • AuthOptions

        public AuthOptions​(java.lang.String key)
                    throws AblyException
        Convenience constructor, to create an AuthOptions based on the key string obtained from the application dashboard.
        Parameters:
        key - : the full key string as obtained from the dashboard
        Throws:
        AblyException