-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More detail for TokenParams and authParams with authUrl #47
Conversation
**** @(RSA8c1b)@ When the @authMethod@ is @POST@, the combined params are sent in the body of the @POST@ request | ||
*** @(RSA8c2)@ @TokenParams@ take precedence over any configured @authParams@ when a name conflict occurs | ||
*** @(RSA8c3)@ Specifying @authParams@ as part of @AuthOptions@ replaces any configured @authParams@ specified in @ClientOptions@. As the key/value pairs are not merged, this enables a developer to delete @authParams@ where necessary by providing an entire new set of @authParams@ | ||
** @(RSA8d)@ When @authCallback@ option is set, it will invoke the callback, passing in the @TokenParams@, and expects either a token string, a @TokenDetails@ object or a @TokenRequest@ object to be returne, which will in turn be used to request a token from Ably |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/returne/returned/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed
lgtm |
*** @(TO3j8)@ @authHeaders@ - Headers to be included in any request made by the library to the @authUrl@ | ||
*** @(TO3j9)@ @authParams@ - Query params to be included in any request made by the library to the @authUrl@ | ||
*** @(TO3j9)@ @authParams@ - Additional params to be included in any request made by the library to the @authUrl@, either as query params in the case of @GET@ or in the body in the case of @POST@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the POST body be form-encoded or JSON?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I would say form-encoded as it's more common. WDYT?
A few comments above; otherwise lgtm. |
696f57c
to
4ccdd3e
Compare
Addresses #39 and ably/ably-js#116
@paddybyers can you please review.
@SimonWoolf please note we are switching the arguments in
requestToken
,createTokenRequest
andauthorise
as it's easy to do now and is better givenTokenParams
is the more important of the two arguments currently.