Revision 3dce76b5 snf-pithos-app/pithos/api/util.py
b/snf-pithos-app/pithos/api/util.py | ||
---|---|---|
1115 | 1115 |
|
1116 | 1116 |
|
1117 | 1117 |
def get_token_from_cookie(request): |
1118 |
assert(request.method == 'GET'),\ |
|
1119 |
"Cookie based authentication is only allowed to GET requests" |
|
1120 | 1118 |
token = None |
1121 | 1119 |
if COOKIE_NAME in request.COOKIES: |
1122 | 1120 |
cookie_value = unquote(request.COOKIES.get(COOKIE_NAME, '')) |
Also available in: Unified diff