summaryrefslogtreecommitdiff
path: root/src/chttpd_auth.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/chttpd_auth.erl')
-rw-r--r--src/chttpd_auth.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chttpd_auth.erl b/src/chttpd_auth.erl
index 4add8ebd..33b6d176 100644
--- a/src/chttpd_auth.erl
+++ b/src/chttpd_auth.erl
@@ -154,7 +154,8 @@ handle_session_req(#httpd{method='GET', user_ctx=UserCtx}=Req) ->
{null, "true"} ->
throw({unauthorized, <<"Please login.">>});
_False ->
- send_json(Req, {[{ok,true}, {name,Name}, {roles,Roles}]})
+ Props = [{name,Name}, {roles,Roles}],
+ send_json(Req, {[{ok,true}, {userCtx, {Props}} | Props]})
end;
handle_session_req(#httpd{method='DELETE'}=Req) ->
% logout