(auth *coreauth.Auth)
| 522 | } |
| 523 | |
| 524 | func authEmail(auth *coreauth.Auth) string { |
| 525 | if auth == nil { |
| 526 | return "" |
| 527 | } |
| 528 | if auth.Metadata != nil { |
| 529 | if v, ok := auth.Metadata["email"].(string); ok { |
| 530 | return strings.TrimSpace(v) |
| 531 | } |
| 532 | } |
| 533 | if auth.Attributes != nil { |
| 534 | if v := strings.TrimSpace(auth.Attributes["email"]); v != "" { |
| 535 | return v |
| 536 | } |
| 537 | if v := strings.TrimSpace(auth.Attributes["account_email"]); v != "" { |
| 538 | return v |
| 539 | } |
| 540 | } |
| 541 | return "" |
| 542 | } |
| 543 | |
| 544 | func authProjectID(auth *coreauth.Auth) string { |
| 545 | if auth == nil { |
no outgoing calls
no test coverage detected