fix(auth): support employee ID usernames
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s

Assisted-by: Codex:GPT-5
This commit is contained in:
2026-08-29 18:42:44 +08:00
parent 746b23b098
commit ab55a432ec
6 changed files with 33 additions and 2 deletions
+8
View File
@@ -88,3 +88,11 @@ ENABLE_OPENID_CONNECT_PKCE = true
loadOAuth2ClientFrom(cfg)
assert.True(t, OAuth2Client.EnableOpenIDConnectPKCE)
}
func TestOAuth2ClientEmployeeIDUsername(t *testing.T) {
cfg, _ := NewConfigProviderFromData(`[oauth2_client]
USERNAME = employee_id
`)
loadOAuth2ClientFrom(cfg)
assert.Equal(t, OAuth2UsernameEmployeeID, OAuth2Client.Username)
}