Récupérer les informations utilisateur dans Spring Security
UserDetails userDetails = (UserDetails) authentication.getPrincipal();
System.out.println("User has authorities: " + userDetails.getAuthorities());
Balaji Rengan