I have created a Spring security application. When the user logs in the user name and roles get stored in Security Context. The same can be retrieved using Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();
How can I store the additional user information like user ID, Email, Associated Branch ID etc in the context?
UserDetailsService
to load the user from database? – shazin