(path, authDir string)
| 88 | } |
| 89 | |
| 90 | func 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 | |
| 108 | func (h *Host) AuthProviderIdentifiers() []string { |
| 109 | if h == nil { |
no outgoing calls
no test coverage detected