Open
Description
Class method Request.from_request() checks 'Authorization' HTTP header for OAuth parameters. However, if you deploy web app with mod_wsgi, 2 important things happen:
- By default, Authorization header is dropped, and you need to use 'WSGIPassAuthorization On' to pass it to your web app codes, for example python/django codes.
- Authorization header is renamed to HTTP_AUTHORIZATION on passing mod_wsgi.
Therefore, to support this case on the server side, the class method Request.from_request() needs to look at HTTP_AUTHORIZATION header as well. It important for implementing OAuth provider services.
The fix is at https://github.com/frankdu/python-oauth2/tree/mod_wsgi_patch. Please check if it good for moving its ass to the master branch.
For more information, please refer to the links below. If anything supplemental is needed, please let me know.
Best Regards,
Du
Links:
- Branch
https://github.com/frankdu/python-oauth2/tree/mod_wsgi_patch - Explanation Article
http://www.frankdu.com/notes/2011/07/10/deploy-oauth-provider-with-mod_wsgi/ - mod_wsgi: Access Control Mechanisms
http://code.google.com/p/modwsgi/wiki/AccessControlMechanisms - WSGIPassAuthorization Directive
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPassAuthorization