mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-05-10 15:57:52 +08:00
- Updated all references from v6 to v7 for `github.com/router-for-me/CLIProxyAPI`. - Ensured consistency in imports within core libraries, tests, and integration tests. - Added missing tests for new features in Redis Protocol integration.
24 lines
710 B
Go
24 lines
710 B
Go
package cmd
|
|
|
|
import (
|
|
sdkAuth "github.com/router-for-me/CLIProxyAPI/v7/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, Antigravity, and Kimi 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.NewAntigravityAuthenticator(),
|
|
sdkAuth.NewKimiAuthenticator(),
|
|
)
|
|
return manager
|
|
}
|