MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / labelFor

Method labelFor

sdk/auth/filestore.go:417–431  ·  view source on GitHub ↗
(metadata map[string]any)

Source from the content-addressed store, hash-verified

415}
416
417func (s *FileTokenStore) labelFor(metadata map[string]any) string {
418 if metadata == nil {
419 return ""
420 }
421 if v, ok := metadata["label"].(string); ok && v != "" {
422 return v
423 }
424 if v, ok := metadata["email"].(string); ok && v != "" {
425 return v
426 }
427 if project, ok := metadata["project_id"].(string); ok && project != "" {
428 return project
429 }
430 return ""
431}
432
433func (s *FileTokenStore) baseDirSnapshot() string {
434 s.dirLock.RLock()

Callers 1

readAuthFilesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected