Hi all,

I'm using Friend https://github.com/cemerick/friend for auth on my webapp 
and I'm measuring how many people login and use the app etc.

In order to do this I need to detect the login and logout events as well as 
the session-id cookie (I need a unique id for session) from the container. 
I've found this quite difficult. 

My current solution is to use custom ring middleware to detect the addition 
of a new session id cookie (from ring) in the response. I thought it would 
be simpler to detect the change in friend/current-identity but, when I 
tried that, I couldn't get the correct session id cookie and I need that 
also.

Logout detection is easier, I can check for the :session value in the 
response changing to nil. 

It's further complicated by the fact that the cookie re-generation on 
localhost/jetty is different to when running on Elastic Beanstalk.

Does anybody have some advice as to a cleaner way to detecting this event 
as well as seeing a unique id?

I thought of implementing a custom :session-store for ring as one option 
but I'd like to hear other ideas if you have them.

Thanks. If I find a better solution I'll update this thread.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to