Files
ProxyPilot/internal/cmd/auth_manager.go
T
Finessse bc30977567 refactor(cmd): update auth manager for new providers
- Remove iFlow authenticator
- Add MiniMax authenticator
- Add Zhipu authenticator
2025-12-28 20:48:44 +07:00

27 lines
864 B
Go

package cmd
import (
sdkAuth "github.com/router-for-me/CLIProxyAPI/v6/sdk/auth"
)
// newAuthManager creates a new authentication manager instance with all supported
// authenticators and a file-based token store. It initializes authenticators for
// Gemini, Codex, Claude, Qwen, Antigravity, Kiro, MiniMax, and Zhipu providers.
//
// Returns:
// - *sdkAuth.Manager: A configured authentication manager instance
func newAuthManager() *sdkAuth.Manager {
store := sdkAuth.GetTokenStore()
manager := sdkAuth.NewManager(store,
sdkAuth.NewGeminiAuthenticator(),
sdkAuth.NewCodexAuthenticator(),
sdkAuth.NewClaudeAuthenticator(),
sdkAuth.NewQwenAuthenticator(),
sdkAuth.NewAntigravityAuthenticator(),
sdkAuth.NewKiroAuthenticator(),
sdkAuth.NewMiniMaxAuthenticator(),
sdkAuth.NewZhipuAuthenticator(),
)
return manager
}