We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40242a8 commit 5211b3bCopy full SHA for 5211b3b
src/main/java/io/insee/dev/k8sonboarding/configuration/UserProviderConfiguration.java
@@ -21,7 +21,7 @@ public UserProvider getUserProvider() {
21
return auth -> {
22
final User user = new User();
23
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
24
- user.setId(authentication.getPrincipal().toString());
+ user.setId(authentication.getName());
25
List<String> roles = authentication.getAuthorities().stream()
26
.map(GrantedAuthority::getAuthority)
27
.map(role -> role.replace("ROLE_", ""))
0 commit comments