Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

An experiment client with requests-oauthlib #136

Closed
wants to merge 5 commits into from

Conversation

tonyseek
Copy link
Contributor

Hi @lepture ,

There is an experiment implementation of the OAuth 1.0a/2.0 client, which based on requests-oauthlib.

The testing is poor for now. But the two examples (twitter and douban) work. Could you merge it into trunk without any document description, until I finished the refresh token mechanism and testing?

Thanks.

endpoint_url='https://api.douban.com/',
access_token_url='https://www.douban.com/service/auth2/token',
authorization_url='https://www.douban.com/service/auth2/auth',
compliance_fixes='.weibo:weibo_compliance_fix')
Copy link
Owner

Choose a reason for hiding this comment

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

douban vs weibo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shonenada has sent a pull request which added the compliance fixes of Douban API to upstream.

@tonyseek tonyseek changed the title An experiment client with requests-oauthlib [WIP] An experiment client with requests-oauthlib Aug 27, 2014
@tonyseek tonyseek force-pushed the feature/requests-oauthlib branch from b15f4b4 to 7769c0e Compare August 28, 2014 03:05
implement the OAuthProperty descriptor.

comment the oauth property's implementation.

add factory method to get extension state from flask app.

And remove the binding of extension state and the app.

decouple remote apps from the ext state.

remove config_prefix (and use app.name instead).

add session class.

fix up typo.

implement the oauth 1.0a authorization.

endpoint_url is optional.

implement authorized_response method.

wrap the access token response.

extract the session factory into mixin class.

move client module into its package.

extract components into standalone modules.

refine the module names.

human friendly exception message.

remove the mixin classes and use application base class.

integrate oauth application with extension.

refine the base application class.

add example for OAuth 1.0a protocol.

implement oauth 2 application with insecure_transport(debug) mode and compliance hooks.

add example for OAuth 2 protocol.

install deps in travis ci.

use douban_compliance_fix in the example file.

See also: requests/requests-oauthlib#138

enable the insecure transport in testing mode too.

warning for Man-in-the-middle attack in production environment.

revise the warning message.
@tonyseek tonyseek force-pushed the feature/requests-oauthlib branch from 7769c0e to ece4d8f Compare December 28, 2014 07:58
@tonyseek tonyseek changed the title [WIP] An experiment client with requests-oauthlib An experiment client with requests-oauthlib Dec 28, 2014
@tonyseek
Copy link
Contributor Author

The refresh token support in OAuth 2.0 is finished now.

@lepture Please review it. Thanks.

@lepture
Copy link
Owner

lepture commented Dec 28, 2014

Version should not be a required parameter, we can detect it by request_token_url.

@tonyseek
Copy link
Contributor Author

Sorry for my tardy response.

Is there a reason to infer which version should be used in OAuth instead of defining it directly? In my opinion a explicit version argument is better. Because almost all third API documents specify their OAuth version clearly, and keeping the version argument give us ability to find a appropriate protocol implementation without any explicit condition.

@lepture
Copy link
Owner

lepture commented Jan 19, 2015

Merged int 85da337

@lepture lepture closed this Jan 19, 2015
@tonyseek
Copy link
Contributor Author

Thank you.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants