-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
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) |
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.
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?
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.
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.
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.
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( |
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.
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) |
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.
Indeed, I would prefer to define auth = ("user", "pass")
and explicit FxA in a separate section
No description provided.