Revision 1055f3c6
b/snf-common/synnefo/lib/astakos.py | ||
---|---|---|
79 | 79 |
return None |
80 | 80 |
|
81 | 81 |
try: |
82 |
return authenticate(token, authentication_url) |
|
83 |
except: |
|
84 |
return None |
|
82 |
authenticate(token, authentication_url) |
|
83 |
except Exception, e: |
|
84 |
# In case of Unauthorized response return None |
|
85 |
if e.args and e.args[-1] == 401: |
|
86 |
return None |
|
87 |
raise e |
|
85 | 88 |
|
86 | 89 |
def get_user(request, authentication_url='http://127.0.0.1:8000/im/authenticate', override_users={}, fallback_token=None): |
87 | 90 |
request.user = None |
Also available in: Unified diff