6

I need to store actual date in DB after a successful user login. How to do that ? Filter, handler or something ? Need help.

Varun Achar
  • 14,781
  • 7
  • 57
  • 74
marioosh
  • 27,328
  • 49
  • 143
  • 192

1 Answers1

7
    public class AuthenticationSuccessHandlerImpl extends SimpleUrlAuthenticationSuccessHandler {
           @Override
       public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) 
       throws IOException, ServletException {
       //your code here    
     }
}

config:

<beans:bean id="authSuccessHandler"
            class="your.pachage.decleration.AuthenticationSuccessHandlerImpl"/>
fatnjazzy
  • 6,070
  • 12
  • 57
  • 83