projects
/
pithos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cd3289
)
Allow authentication token to be set anywhere.
author
Antony Chazapis
<chazapis@gmail.com>
Thu, 14 Jul 2011 10:10:37 +0000
(13:10 +0300)
committer
Antony Chazapis
<chazapis@gmail.com>
Thu, 14 Jul 2011 10:10:37 +0000
(13:10 +0300)
pithos/api/auth.py
patch
|
blob
|
history
diff --git
a/pithos/api/auth.py
b/pithos/api/auth.py
index
0508ace
..
431bbfb
100644
(file)
--- a/
pithos/api/auth.py
+++ b/
pithos/api/auth.py
@@
-37,6
+37,6
@@
from django.conf import settings
class DummyAuthMiddleware(object):
def process_request(self, request):
token = request.META.get('HTTP_X_AUTH_TOKEN', None)
- if token is None and request.META.get('CONTENT_TYPE', '').startswith('multipart/form-data'):
- token = request.POST.get('X-Auth-Token', None)
+ if token is None:
+ token = request.REQUEST.get('X-Auth-Token', None)
request.user = settings.AUTH_TOKENS.get(token, None)