david / django-oauth (http://oauth.net/)
Support of OAuth in Django. Note that http://code.welldev.org/django-oauth-plus will use python-oauth2 if you're interested in it.
| commit 39: | 444b2446c572 |
| parent 38: | c80b48e63390 |
| branch: | default |
Fix a bug, request.environ only exists in a WSGI environment. Thanks Toby White.
11 months ago
Changed (Δ25 bytes):
raw changeset »
oauth_provider/utils.py (3 lines added, 2 lines removed)
Up to file-list oauth_provider/utils.py:
| … | … | @@ -19,11 +19,12 @@ def initialize_server_request(request): |
19 |
19 |
elif 'HTTP_AUTHORIZATION' in request.META: |
20 |
20 |
auth_header = {'Authorization': request.META['HTTP_AUTHORIZATION']} |
21 |
21 |
|
22 |
parameters = dict(request.REQUEST.items()) |
|
22 |
23 |
oauth_request = OAuthRequest.from_request(request.method, |
23 |
24 |
request.build_absolute_uri(), |
24 |
25 |
headers=auth_header, |
25 |
parameters=dict(request.REQUEST.items()), |
|
26 |
query_string=request.environ.get('QUERY_STRING', '')) |
|
26 |
parameters=parameters, |
|
27 |
query_string=request.META.get('QUERY_STRING', '')) |
|
27 |
28 |
if oauth_request: |
28 |
29 |
oauth_server = OAuthServer(DataStore(oauth_request)) |
29 |
30 |
if 'plaintext' in OAUTH_SIGNATURE_METHODS: |
