1. Luke Plant
  2. django-piston

Commits

Jesper Nøhr  committed d90bca1

switching to oauth header auth, broke the testsuite on delete -- tomorrow's another day

  • Participants
  • Parent commits 9bd7038
  • Branches default

Comments (0)

Files changed (2)

File piston/authentication.py

View file
             try:
                 consumer, token, parameters = self.validate_token(request)
             except oauth.OAuthError, err:
+                print send_oauth_error(err)
                 return False
 
             if consumer and token:

File piston/oauth.py

View file
             parameters = {}
 
         # headers
-        if headers and 'Authorization' in headers:
-            auth_header = headers['Authorization']
+        if headers and 'HTTP_AUTHORIZATION' in headers:
+            auth_header = headers['HTTP_AUTHORIZATION']
             # check that the authorization header is OAuth
             if auth_header.index('OAuth') > -1:
                 try: