I would like to record in the database each time there is a successful login. Information I would like to record is user, IP address, and maybe browser or other info to help identify how/where the user logged in.
I see the examples of how to get the authentication details from InteractiveAuthenticationSuccessEvent, but the ClientDetails object does not have much info and does not have the IP address.
User user = (User) event.getAuthentication().getPrincipal();
ClientDetails details = (ClientDetails) event.getAuthentication().getDetails();
Should I be retrieving the request information somewhere else?