refactor(auth): replace FileStore with FileTokenStore for unified token persistence

- Removed `FileStore` in favor of the new `FileTokenStore`.
- Centralized auth JSON handling and token operations through `FileTokenStore`.
- Updated all components to utilize `FileTokenStore` for consistent storage operations.
- Introduced `SetBaseDir` and directory locking mechanisms for flexible configurations.
- Enhanced metadata management, including path resolution and deep JSON comparisons.
This commit is contained in:
Luis Pater
2025-09-25 07:19:25 +08:00
parent 8fc73874de
commit bb8f93146f
9 changed files with 371 additions and 286 deletions

View File

@@ -817,7 +817,7 @@ func (m *Manager) persist(ctx context.Context, auth *Auth) error {
if auth.Metadata == nil {
return nil
}
return m.store.Save(ctx, auth)
return m.store.SaveAuth(ctx, auth)
}
// StartAutoRefresh launches a background loop that evaluates auth freshness