Skip to content

Commit

Permalink
Fix NPE when groups is null (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevitt authored Oct 25, 2023
1 parent abdfa70 commit aa0ddfa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ public UserProvider getUserProvider() {
.getRequest()));
user.setEmail(userInfo.getClaimAsString("email"));
user.setNomComplet(userInfo.getClaimAsString("name"));
user.setGroups(userInfo.getClaimAsStringList(groupsClaim));
if (userInfo.getClaimAsStringList(groupsClaim) != null) {
user.setGroups(userInfo.getClaimAsStringList(groupsClaim));
}
user.getAttributes().putAll(userInfo.getClaims());
user.getAttributes().put("sub", userInfo.getSubject());
user.getAttributes().put("access_token", userInfo.getTokenValue());
Expand Down

0 comments on commit aa0ddfa

Please sign in to comment.