1
0
forked from baron/baron-sso

tenants 명칭 및 profile 전화번호 추가

This commit is contained in:
2026-06-17 10:50:37 +09:00
parent 95ac26734a
commit fd05c049d3
11 changed files with 98 additions and 61 deletions

View File

@@ -1111,6 +1111,9 @@ func buildOidcClaimsFromTraits(traits map[string]any, scopes []string, tenantID
if len(emails) > 0 {
profile["emails"] = emails
}
if phone := getString("phone_number"); phone != "" {
profile["phones"] = []string{phone}
}
if len(profile) > 0 {
claims["profile"] = profile
}
@@ -1364,7 +1367,7 @@ func (h *AuthHandler) withHanmacFamilyTenantClaims(ctx context.Context, claims m
func tenantClaimScopeRequested(scopes []string) bool {
for _, scope := range scopes {
if strings.EqualFold(strings.TrimSpace(scope), "tenant") {
if strings.EqualFold(strings.TrimSpace(scope), "tenants") || strings.EqualFold(strings.TrimSpace(scope), "tenant") {
return true
}
}