Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Commit

Permalink
fix(ldap): Set username to upper-case to avoid user duplicate with di…
Browse files Browse the repository at this point in the history
…fferent login cases

Closes gravitee-io/issues#548
  • Loading branch information
brasseld authored and NicolasGeraud committed Jan 11, 2018
1 parent 96f039a commit 534bcd6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public UserDetails mapUserFromContext(DirContextOperations ctx, String username,
}

io.gravitee.management.idp.api.authentication.UserDetails userDetails =
new io.gravitee.management.idp.api.authentication.UserDetails(username, "", mappedAuthorities);
new io.gravitee.management.idp.api.authentication.UserDetails(username.toUpperCase(), "", mappedAuthorities);

userDetails.setFirstname(ctx.getStringAttribute("sn"));
userDetails.setLastname(ctx.getStringAttribute("givenName"));
Expand Down

0 comments on commit 534bcd6

Please sign in to comment.