mozilla / PyFxA

Python library for interacting with the Firefox Accounts ecosystem
Other
31 stars 20 forks source link

Adding helpers to create Firefox Account and generate Bearer token and BrowserID assertions #35

Closed Natim closed 8 years ago

Natim commented 8 years ago

Following this article: http://www.servicedenuages.fr/en/load-testing-a-http-api-which-uses-oauth-for-authentication

I have been starting to work on tools to help load-testing with Firefox Account.

So far I have two command that let you write down a bearer token in a bash file (in order to export it in the environment to then load it)

The gist of the idea is there: https://gist.github.com/Natim/f4b1be4dde6eff8adaf2

What do you think about adding those helpers to PyFxA? Should I put the function only (create_new_user, get_bearer_token)? Add the commands as well (bin/create_new_user_token loadtest_salt, bin/get_bearer_token email password)? Do you want a specific file architecture for that? (fxa.commands.get_bearer_token)

In that case I would refactor the plugin to use functions that would be shared with the CLI tools.

Natim commented 8 years ago

f? @rfk @almet

rfk commented 8 years ago

Sounds good to me. I wonder if the following architecture makes sense:

rfk commented 8 years ago

Assigning to @almet for further feedback

Natim commented 8 years ago

Thanks @rfk, @almet told me on IRC that he agrees. I like the idea of having subcommands. A PR will follow shortly :+1:

Natim commented 8 years ago

Superseeded by https://github.com/mozilla/PyFxA/pull/36