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