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 service applicationlistener):

    if (appevent instanceof authenticationsuccessevent) {     if (appevent.source instanceof remembermeauthenticationtoken) {     } } 

    maybe place collect login events.

  • logout - in our own logout action redirects j_spring_security_logout.
  • we don't log session timeouts.

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -