I\'d like to track when users are logging in to my application. I have some code that I would like to execute right after the user is authenticated. The problem is, I can\'t fig
Just write your own SpringSecurityFilter and add it to the filter chain right after your authentication provider is called.
package my.code;
public class AuditFilter extends SpringSecurityFilter {
public void doFilterHttp(...) throws ... {
{application code to run before request is processed}
chain.doFilter(...);
{application code to run after request has fully processed}
}
}
Then in your configuration XML (wherever you setup the Security Filter chain) add a line like this:
<-- you can change the position