MCPcopy Index your code
hub / github.com/larksuite/cli / sanitizeLoginScopeCacheKey

Function sanitizeLoginScopeCacheKey

cmd/auth/login_scope_cache.go:37–43  ·  view source on GitHub ↗

sanitizeLoginScopeCacheKey converts a device_code into a safe filename token.

(deviceCode string)

Source from the content-addressed store, hash-verified

35
36// sanitizeLoginScopeCacheKey converts a device_code into a safe filename token.
37func 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.
46func saveLoginRequestedScope(deviceCode, requestedScope string) error {

Callers 1

loginScopeCachePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected