Unified · Split
| @@ -454,25 +454,12 @@ func extractCodexIDTokenClaims(auth *coreauth.Auth) gin.H { · 453 unmodified lines | ||
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | result := gin.H{} |
| 457 | + if v := strings.TrimSpace(claims.CodexAuthInfo.ChatgptAccountID); v != "" { | |
| 458 | + result["chatgpt_account_id"] = v | |
| 459 | + } | |
| 457 | 460 | if v := strings.TrimSpace(claims.CodexAuthInfo.ChatgptPlanType); v != "" { |
| 458 | 461 | result["plan_type"] = v |
| 459 | 462 | } |
| 460 | − if v := strings.TrimSpace(claims.CodexAuthInfo.UserID); v != "" { | |
| 461 | − result["user_id"] = v | |
| 462 | − } | |
| 463 | − | |
| 464 | − if len(claims.CodexAuthInfo.Organizations) > 0 { | |
| 465 | − orgs := make([]gin.H, 0, len(claims.CodexAuthInfo.Organizations)) | |
| 466 | − for _, org := range claims.CodexAuthInfo.Organizations { | |
| 467 | − orgs = append(orgs, gin.H{ | |
| 468 | − "id": strings.TrimSpace(org.ID), | |
| 469 | − "title": strings.TrimSpace(org.Title), | |
| 470 | − "role": strings.TrimSpace(org.Role), | |
| 471 | − "is_default": org.IsDefault, | |
| 472 | − }) | |
| 473 | − } | |
| 474 | − result["organizations"] = orgs | |
| 475 | − } | |
| 476 | 463 | |
| 477 | 464 | if len(result) == 0 { |
| 478 | 465 | return nil |