Skip to content

Commit

Permalink
Allow clientoptions.token to be a string, tokendetails, or tokenrequest
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonWoolf authored and mattheworiordan committed Jan 20, 2017
1 parent 2882c0e commit 788a327
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions content/client-lib-development-guide/features.textile
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ h4. ClientOptions
** @(TO3i)@ @recover@ string - A connection recovery string, specified with the intention of inheriting the state of an earlier connection
** @(TO3j)@ Auth option attributes:
*** @(TO3j1)@ @key@ string - Full Ably key string as obtained from dashboard
*** @(TO3j2)@ @token@ string - An authentication token string issued for this application
*** @(TO3j2)@ @token@ string | @TokenDetails@ | @TokenRequest@ - An authentication token issued for this application, either in the form of a token string, a @TokenDetails@ object, or a @TokenRequest@ object
*** @(TO3j3)@ @tokenDetails@ @TokenDetails@ - An authentication token issued for this application
*** @(TO3j4)@ @useTokenAuth@ boolean - When true, token authentication will always be used by the client. If @clientId@ is unspecified, then the token issued will inherently be anonymous i.e. it will contain an empty @clientId@
*** @(TO3j5)@ @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. If a JSON-encodable object is provided in the callback, then the library will determine if it's a @TokenDetails@ (if it contains a @token@ key) or @TokenRequest@ (no @token@ key) and use the @fromJson@ method ("TD7":#TD7, "TE6":#TE6) to construct an object
Expand Down Expand Up @@ -1190,7 +1190,7 @@ class AuthOptions: // RSA8e
authUrl: String? // RSC14c, RSA4, RSA8c, TO3j6, AO2c
key: String? // RSC14a, RSA14, TO3j1, AO2a
queryTime: Bool default false // RSA9d, TO3j10, AO2a
token: String? | TokenDetails? // RSC14c, RSA4, TO3j2
token: String? | TokenDetails? | TokenRequest? // RSA4, TO3j2
tokenDetails: TokenDetails? // RSC14c, RSA4, TO3j3
useTokenAuth: Bool? // RSA4, RSA14, TO3j4

Expand Down
2 changes: 1 addition & 1 deletion content/types/_client_options.textile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ h4.

- <span lang="default">key</span><span lang="csharp">Key</span><span lang="ruby">:key</span> := The full key string, as obtained from the "application dashboard":http://support.ably.io/solution/articles/3000030053-how-do-i-access-my-app-dashboard. Use this option if you wish to use Basic authentication, or wish to be able to issue tokens without needing to defer to a separate entity to sign token requests. Read more about "Basic authentication":/general/authentication#basic-authentication<br>__Type: @String@__

- <span lang="default">token</span><span lang="csharp">Token</span><span lang="ruby">:token</span> := An authenticated token string that is most commonly obtained from the <span lang="default">@token@</span><span lang="csharp">@Token@</span> property of a "@TokenDetails@":/realtime/types#token-details component of a token request response. Use this option if you wish to use Token authentication. Read more about "Token authentication":/general/authentication#token-authentication<br>__Type: @String@__
- <span lang="default">token</span><span lang="csharp">Token</span><span lang="ruby">:token</span> := An authenticated token. This can either be a "@TokenDetails@":/realtime/types#token-details object, a "@TokenRequest@":/realtime/types#token-request object, or token string obtained from the <span lang="default">@token@></span><span lang="csharp">@Token@</span> property of a "@TokenDetails@":/realtime/types#token-details component of a token request response. Use this option if you wish to use Token authentication. Read more about "Token authentication":/general/authentication#token-authentication<br>__Type: @String@, @TokenDetails@ or @TokenRequest@__

- <span lang="default">tokenDetails</span><span lang="csharp">TokenDetails</span><span lang="python">token_details</span><span lang="ruby">:token_details</span> := An authenticated "@TokenDetails@":/realtime/types/#token-details object that is most commonly obtained from of a token request response. Use this option if you wish to use Token authentication. Read more about "Token authentication":/general/authentication#token-authentication<br>__Type: @TokenDetails@__

Expand Down

0 comments on commit 788a327

Please sign in to comment.