Revision 0a444bb5
b/snf-pithos-app/pithos/api/delegate.py | ||
---|---|---|
95 | 95 |
return HttpResponse(status=e.reason) |
96 | 96 |
return HttpResponse() |
97 | 97 |
|
98 |
def account_username(request): |
|
99 |
uuid = request.META.get('HTTP_X_USER_UUID') |
|
100 |
try: |
|
101 |
username = get_username( |
|
102 |
SERVICE_TOKEN, uuid, USER_INFO_URL, |
|
103 |
AUTHENTICATION_USERS) |
|
104 |
return HttpResponse(content=username) |
|
105 |
except Exception, e: |
|
106 |
try: |
|
107 |
content, status = e.args |
|
108 |
except: |
|
109 |
content, status = e, 500 |
|
110 |
|
|
111 |
return HttpResponse(status=status, content=content) |
b/snf-pithos-app/pithos/api/urls.py | ||
---|---|---|
49 | 49 |
(r'^v1\.0(?:$|/)', include(api_urlpatterns)), |
50 | 50 |
(r'^public/(?P<v_public>.+?)/?$', 'pithos.api.public.public_demux'), |
51 | 51 |
(r'^login/?$', 'pithos.api.delegate.delegate_to_login_service'), |
52 |
(r'^feedback/?$', 'pithos.api.delegate.delegate_to_feedback_service'), |
|
53 |
# (r'^account/?$', 'pithos.api.delegate.account_username') |
|
54 |
) |
|
52 |
(r'^feedback/?$', 'pithos.api.delegate.delegate_to_feedback_service')) |
Also available in: Unified diff