diff --git a/onyxia-api/src/main/java/fr/insee/onyxia/api/security/OIDCConfiguration.java b/onyxia-api/src/main/java/fr/insee/onyxia/api/security/OIDCConfiguration.java index ca51a3db..be907b62 100644 --- a/onyxia-api/src/main/java/fr/insee/onyxia/api/security/OIDCConfiguration.java +++ b/onyxia-api/src/main/java/fr/insee/onyxia/api/security/OIDCConfiguration.java @@ -136,6 +136,9 @@ public UserProvider getUserProvider() { user.setEmail(userInfo.getClaimAsString("email")); user.setNomComplet(userInfo.getClaimAsString("name")); user.setGroups(userInfo.getClaimAsStringList(groupsClaim)); + user.getAttributes().putAll(userInfo.getClaims()); + user.getAttributes().put("sub", userInfo.getSubject()); + user.getAttributes().put("access_token", userInfo.getTokenValue()); return user; }; }