sanitizeLoginScopeCacheKey converts a device_code into a safe filename token.
(deviceCode string)
| 35 | |
| 36 | // sanitizeLoginScopeCacheKey converts a device_code into a safe filename token. |
| 37 | func sanitizeLoginScopeCacheKey(deviceCode string) string { |
| 38 | sanitized := loginScopeCacheSafeChars.ReplaceAllString(deviceCode, "_") |
| 39 | if sanitized == "" { |
| 40 | return "default" |
| 41 | } |
| 42 | return sanitized |
| 43 | } |
| 44 | |
| 45 | // saveLoginRequestedScope persists the requested scope string for a device_code. |
| 46 | func saveLoginRequestedScope(deviceCode, requestedScope string) error { |
no outgoing calls
no test coverage detected