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

Function normalizeAuthSourceKind

sdk/cliproxy/auth/classification.go:87–104  ·  view source on GitHub ↗
(source string)

Source from the content-addressed store, hash-verified

85}
86
87func normalizeAuthSourceKind(source string) string {
88 switch strings.ToLower(strings.TrimSpace(source)) {
89 case AuthSourceConfig:
90 return AuthSourceConfig
91 case AuthSourceFile, "filesystem":
92 return AuthSourceFile
93 case AuthSourceGit:
94 return AuthSourceGit
95 case AuthSourceMemory, "runtime", "runtime_only":
96 return AuthSourceMemory
97 case AuthSourceObjectStore, "object-store":
98 return AuthSourceObjectStore
99 case AuthSourcePostgres, "postgresql", "database", "db":
100 return AuthSourcePostgres
101 default:
102 return ""
103 }
104}
105
106func authHasOAuthMetadata(auth *Auth) bool {
107 if auth == nil || len(auth.Metadata) == 0 {

Callers 1

AuthSourceKindMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected