How to obtain current user metadata in Clojure Friend? -
i using friend library. need provide request handler return user roles (and possibly other metadata) logged in user.
i've added simple request handler:
(get "/userinfo.do" request (friend/identity request))
but returns nil
. proper way of fetching user session data?
this worked:
(get "/userinfo.do" request (json/write-str (friend/current-authentication)))
Comments
Post a Comment