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.

Clone this repository (size: 114.7 KB): HTTPS / SSH
$ hg clone http://code.welldev.org/django-oauth
commit 49: fab39feff68e
parent 48: 97ce3e2f9430
branch: default
make this work with multipart
bdb
7 months ago

Changed (Δ254 bytes):

raw changeset »

oauth_provider/utils.py (8 lines added, 2 lines removed)

Up to file-list oauth_provider/utils.py:

@@ -18,8 +18,14 @@ def initialize_server_request(request):
18
18
        auth_header = {'Authorization': request.META['Authorization']}
19
19
    elif 'HTTP_AUTHORIZATION' in request.META:
20
20
        auth_header =  {'Authorization': request.META['HTTP_AUTHORIZATION']}
21
    
22
    parameters = dict(request.REQUEST.items())
21
   
22
    # imported from timetric's github
23
    parameters = request.GET.copy()
24
    if (request.method == "POST" and
25
        request.META.get('CONTENT_TYPE') in ["application/x-www-form-urlencoded", None]):
26
        # a QueryDict update will preserve multiple values.
27
        parameters.update(request.POST)
28
23
29
    oauth_request = OAuthRequest.from_request(request.method, 
24
30
                                              request.build_absolute_uri(), 
25
31
                                              headers=auth_header,