Skip to content

Commit 5211b3b

Browse files
authored
[FIX] 🐛 invalid user id
1 parent 40242a8 commit 5211b3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/insee/dev/k8sonboarding/configuration/UserProviderConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public UserProvider getUserProvider() {
2121
return auth -> {
2222
final User user = new User();
2323
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
24-
user.setId(authentication.getPrincipal().toString());
24+
user.setId(authentication.getName());
2525
List<String> roles = authentication.getAuthorities().stream()
2626
.map(GrantedAuthority::getAuthority)
2727
.map(role -> role.replace("ROLE_", ""))

0 commit comments

Comments
 (0)