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

Show how to use the FxABearerTokenAuth auth. #117

Merged
merged 2 commits into from
Mar 13, 2017
Merged

Conversation

Natim
Copy link
Member

@Natim Natim commented Feb 13, 2017

No description provided.

README.rst Outdated
client_id="<FXA-CLIENT-ID>",
account_server_url='https://api.accounts.firefox.com/v1',
oauth_server_url='https://oauth.accounts.firefox.com/v1',
)
client = Client(bucket="payments", collection="receipts", auth=auth)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be a separate example, rather than trying to wedge this in with the example where you can pass bucket and collection to the Client constructor?

Copy link
Member Author

Choose a reason for hiding this comment

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

I asked myself the question, but auth wasn't defined and we are talking about FxA just before reason why I added it there. I can change that if you find it confusing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, I would prefer to define auth = ("user", "pass") and explicit FxA in a separate section

README.rst Outdated
@@ -79,6 +79,14 @@ at creation time, so that this value will be used by default.

.. code-block:: python

from fxa.plugins.requests import FxABearerTokenAuth
auth = FxABearerTokenAuth(
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: pass line

README.rst Outdated
client_id="<FXA-CLIENT-ID>",
account_server_url='https://api.accounts.firefox.com/v1',
oauth_server_url='https://oauth.accounts.firefox.com/v1',
)
client = Client(bucket="payments", collection="receipts", auth=auth)
Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed, I would prefer to define auth = ("user", "pass") and explicit FxA in a separate section

@Natim Natim merged commit 65f4cba into master Mar 13, 2017
@Natim Natim deleted the fxa-auth-example branch March 13, 2017 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants