mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 04:10:51 +08:00
- Added detailed package-level comments to improve documentation coverage. - Clarified parameter descriptions, return types, and functionality of exported methods across packages. - Enhanced overall code readability and API documentation consistency.
23 lines
660 B
Go
23 lines
660 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, and Qwen providers.
|
|
//
|
|
// Returns:
|
|
// - *sdkAuth.Manager: A configured authentication manager instance
|
|
func newAuthManager() *sdkAuth.Manager {
|
|
store := sdkAuth.NewFileTokenStore()
|
|
manager := sdkAuth.NewManager(store,
|
|
sdkAuth.NewGeminiAuthenticator(),
|
|
sdkAuth.NewCodexAuthenticator(),
|
|
sdkAuth.NewClaudeAuthenticator(),
|
|
sdkAuth.NewQwenAuthenticator(),
|
|
)
|
|
return manager
|
|
}
|