-
Notifications
You must be signed in to change notification settings - Fork 455
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
Conversation
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') |
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.
douban vs weibo
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.
@shonenada has sent a pull request which added the compliance fixes of Douban API to upstream.
b15f4b4
to
7769c0e
Compare
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.
7769c0e
to
ece4d8f
Compare
The refresh token support in OAuth 2.0 is finished now. @lepture Please review it. Thanks. |
Version should not be a required parameter, we can detect it by |
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. |
Merged int 85da337 |
Thank you. |
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.