sanitizeAgentName restricts AUTH0_CLI_CLIENT to the allow-list; unknown values are prefixed with "client-".
(raw string)
| 226 | |
| 227 | // sanitizeAgentName restricts AUTH0_CLI_CLIENT to the allow-list; unknown values are prefixed with "client-". |
| 228 | func sanitizeAgentName(raw string) string { |
| 229 | lower := strings.ToLower(strings.TrimSpace(raw)) |
| 230 | |
| 231 | for _, name := range knownAgentClients { |
| 232 | if lower == name { |
| 233 | return name |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | return "client-" + lower |
| 238 | } |
no outgoing calls