wreq
wreq copied to clipboard
Add two more ways of authentication for the OAuth 1.0a workflow
This pull request is a superset of #45. I'm not sure if the changes here make sense to add to Wreq. This adds three more authentication options:
- The first one to make requests once the user has API keys (consumer token, consumer secret) and access tokens for a resource-owner.
- The second one to ask a service provider to generate temporary tokens so the client can request permission from the resource-owner using the redirection workflow common in OAuth 1.0a.
- A third one to exchange temporary tokens and an oauth_verifier token for access tokens in order to finish authentication.
This effectively makes Wreq capable of conducting the whole three-legged authentication required by a service provider such as Twitter.
Only OAuth 1.0a is supported, mainly because I'm not sure how to support OAuth 1.0 without adding three more constructors to the Auth type.
I applied #45, which has many conflicts with this PR. How would you like to proceed?