groovy - What is the best approach to collect/define lastvisited information in Grails/spring security? -
what best practice or approach lastvisited information user in grails? user login, using spring security , want show few junks of information based on lastvisited date. far don't have property in user domain. please let me know different , possible approaches can collect aforementioned information within grails application. related query is, how can combat aforementioned problem when user closes window or tab in browser without pressing logout link/button?
we ended pretty messy - happy know better way. we're saving visit info of:
- login - in action
spring-security-redirect
points to; login "remember me" - in
applicationlistener.onapplicationevent(appevent)
(we made serviceapplicationlistener
):if (appevent instanceof authenticationsuccessevent) { if (appevent.source instanceof remembermeauthenticationtoken) { } }
maybe place collect login events.
- logout - in our own
logout
action redirectsj_spring_security_logout
. - we don't log session timeouts.
Comments
Post a Comment