mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
refactor(client): remove deprecated and unused methods for cleaner session handling and core auth management
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/router-for-me/CLIProxyAPI/v6/internal/api"
|
||||
baseauth "github.com/router-for-me/CLIProxyAPI/v6/internal/auth"
|
||||
geminiwebclient "github.com/router-for-me/CLIProxyAPI/v6/internal/client/gemini-web"
|
||||
"github.com/router-for-me/CLIProxyAPI/v6/internal/config"
|
||||
"github.com/router-for-me/CLIProxyAPI/v6/internal/registry"
|
||||
@@ -270,33 +269,6 @@ func (s *Service) ensureAuthDir() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Service) syncCoreAuthFromClients(ctx context.Context, _ map[string]any) { _ = ctx }
|
||||
|
||||
func (s *Service) startRefreshLoop() {
|
||||
// legacy refresh loop disabled; core auth manager handles auto refresh
|
||||
}
|
||||
|
||||
func (s *Service) refreshTokens(ctx context.Context) { _ = ctx /* no-op */ }
|
||||
|
||||
func (s *Service) snapshotFileClients() map[string]any { return nil }
|
||||
|
||||
// persistClients deprecated: no legacy clients remain
|
||||
func (s *Service) persistClients() {}
|
||||
|
||||
// refreshCachesFromCombined deprecated: no legacy clients remain
|
||||
func (s *Service) refreshCachesFromCombined(_ map[string]any) {}
|
||||
|
||||
// combineClients deprecated
|
||||
|
||||
func (s *Service) refreshWithManager(ctx context.Context, provider, filePath string, storage baseauth.TokenStorage, metadata map[string]string) {
|
||||
_ = ctx
|
||||
_ = provider
|
||||
_ = filePath
|
||||
_ = storage
|
||||
_ = metadata
|
||||
// legacy file-backed refresh was replaced by core auth manager auto refresh
|
||||
}
|
||||
|
||||
// syncCoreAuthFromAuths registers or updates core auths and disables missing ones.
|
||||
func (s *Service) syncCoreAuthFromAuths(ctx context.Context, auths []*coreauth.Auth) {
|
||||
if s.coreManager == nil {
|
||||
|
||||
Reference in New Issue
Block a user