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

Function authIDForPath

internal/pluginhost/auth_provider.go:90–106  ·  view source on GitHub ↗
(path, authDir string)

Source from the content-addressed store, hash-verified

88}
89
90func authIDForPath(path, authDir string) string {
91 path = strings.TrimSpace(path)
92 if path == "" {
93 return ""
94 }
95 id := path
96 if authDir = strings.TrimSpace(authDir); authDir != "" {
97 if rel, errRel := filepath.Rel(authDir, path); errRel == nil && rel != "" && !strings.HasPrefix(rel, "..") {
98 id = rel
99 }
100 }
101 id = filepath.ToSlash(filepath.Clean(id))
102 if runtime.GOOS == "windows" {
103 id = strings.ToLower(id)
104 }
105 return id
106}
107
108func (h *Host) AuthProviderIdentifiers() []string {
109 if h == nil {

Callers 1

pluginAuthDataToCoreAuthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected