-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add oauth support #117
Comments
As httpie is powered by requests you may want to have a look at https://github.com/requests/requests-oauthlib. |
Will this include both OAuth 1 and OAuth 2? |
Ideally both. Do you know of a good overview of the most common ways oauth is used? Perhaps the auth backends could be made pluggable, distributed in its own packages, and once installed they could be enabled via the config file. Btw, there is an older fork that adds support for OAuth 1.0 2-legged. It's not directly usable, but it provides the intended UI for specifying the auth type, key, and secret:
|
Actually I would like to focus on OAuth2 first as it is easier to implement. Some example of different OAuth consumers can probably taken from the oauth.org repo: I am not sure how we should handle the different providers. Either do it in a similar way as curlish (that is: provide configuration files. Spawn a http server for the callback and use the browser-web-flow to get the token. This will probably be required for OAuth1 anyway). Or integrate the services directly in httpie.
But having to patch and update httpie just to use another service provider doesn't seem too appealing. |
Since HTTPie is built on top of requests, it might make sense to build OAuth 2 support into requests, which doesn't currently exist. They have an extension for OAuth 1 currently here: https://github.com/requests/requests-oauthlib |
I've updated my fork for OAuth 1.0a https://github.com/akhenakh/httpie, as the patch is really small using requests-oauthlib can we integrate in httpie ? |
@akhenakh Support for OAuth 1.0.a 2-legged is now provided by the httpie-oauth plugin (requires HTTPie master). The plugin is meant to provide also 3-legged OAuth flow and OAuth 2 support later on, but will require more work. |
@jkbr thanks for the update, you should fix the home page for httpie-oauth it says "pip install httpie-auth" ! |
@akhenakh good catch, fixed! |
Are there any concrete plans already?
There are already some hints that this might be added in the future. I would like to help out a bit.
There is a wrapper around curl that does this. Maybe some parts of the implementation could be taken from it: http://packages.python.org/curlish/
The text was updated successfully, but these errors were encountered: