I have a code that manually authenticates the user, but I want this to also call the logic contained in onAuthenticationSuccessEvent. The code that I have now looks like this:
springSecurityService.reauthenticate(user.username)
authenticationSuccessHandler.onAuthenticationSuccess(request, response, springSecurityService.getAuthentication())
It writes the user in order, but does not call onAuthenticationSuccessEvent, as I thought. I understood that the authentication call SuHuHandler.onAuthenticationSuccess would cause this, but it is not. How can I fire this event when logging in manually?
Thank!
source
share