Fixing getUsername
This commit is contained in:
parent
74182ab00d
commit
1c10f36883
|
@ -21,7 +21,7 @@ public class KeycloakUser extends AccessToken implements User {
|
|||
@Override
|
||||
@JsonIgnore
|
||||
public String getUsername() {
|
||||
return getId();
|
||||
return (String) getOtherClaims().getOrDefault("preferred_username", getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue