commit | e49fb98f51e7fe061b195824d0b8cac7acdba85b | [log] [tgz] |
---|---|---|
author | Guilhem Moulin <guilhem@libreoffice.org> | Thu Jun 25 15:59:51 2020 +0200 |
committer | David Ostrovsky <david@ostrovsky.org> | Sun Jul 05 16:48:01 2020 +0200 |
tree | 2529186be53e2ee92d61716e482dd7c0cc3d6fe6 | |
parent | 48e314533fdea8f6f191516847fc4008f5baaa1f [diff] |
LemonLDAP::NG: Set username claim name in accordance with specs Spec: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims Change-Id: I86831e83878261f8c364f43c3d3bce576453562e
diff --git a/src/main/java/com/googlesource/gerrit/plugins/oauth/LemonLDAPOAuthService.java b/src/main/java/com/googlesource/gerrit/plugins/oauth/LemonLDAPOAuthService.java index f1a0dbe..e4e6723 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/oauth/LemonLDAPOAuthService.java +++ b/src/main/java/com/googlesource/gerrit/plugins/oauth/LemonLDAPOAuthService.java
@@ -90,7 +90,7 @@ throw new IOException("Response doesn't contain 'user' field" + jsonObject); } JsonElement id = jsonObject.get("sub"); - JsonElement username = jsonObject.get("username"); + JsonElement username = jsonObject.get("preferred_username"); JsonElement email = jsonObject.get("email"); JsonElement name = jsonObject.get("name"); return new OAuthUserInfo(