title: How to call a method just after authentication and just before logout? (Spring Security)
body: <p>I want to write a row in a db every time a user logs into my application (that uses spring security), and to add the logout time to that row when he logs out, in order to register the number of access and the duration of the session.</p>
  
  <p>I thought there was some Post-Authentication Filter, but I checked the documentation and couldn't find any reference of it.</p>
  
  <p>Is too invasive to write a filter and add it to the spring security filter chain?</p>
  
  <p>Is there some another workaround?</p>