(id string)
| 211 | } |
| 212 | |
| 213 | func (s *FileTokenStore) resolveDeletePath(id string) (string, error) { |
| 214 | if strings.ContainsRune(id, os.PathSeparator) || filepath.IsAbs(id) { |
| 215 | return id, nil |
| 216 | } |
| 217 | dir := s.baseDirSnapshot() |
| 218 | if dir == "" { |
| 219 | return "", fmt.Errorf("auth filestore: directory not configured") |
| 220 | } |
| 221 | return filepath.Join(dir, id), nil |
| 222 | } |
| 223 | |
| 224 | func (s *FileTokenStore) readAuthFiles(path, baseDir string) ([]*cliproxyauth.Auth, error) { |
| 225 | data, err := os.ReadFile(path) |