Skip to content
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

Merged
merged 4 commits into from
Sep 29, 2015

Conversation

mattheworiordan
Copy link
Member

Addresses #39 and ably/ably-js#116

@paddybyers can you please review.

@SimonWoolf please note we are switching the arguments in requestToken, createTokenRequest and authorise as it's easy to do now and is better given TokenParams is the more important of the two arguments currently.

**** @(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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/returne/returned/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed

@SimonWoolf
Copy link
Member

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@
Copy link
Member

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?

Copy link
Member Author

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?

@paddybyers
Copy link
Member

A few comments above; otherwise lgtm.

@mattheworiordan mattheworiordan merged commit 4ccdd3e into source Sep 29, 2015
@mattheworiordan mattheworiordan deleted the requestToken-arity-fix branch September 29, 2015 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants