mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-17 20:00:52 +08:00
- OAuth2 device authorization grant flow (RFC 8628) for authentication - Streaming and non-streaming chat completions via OpenAI-compatible API - Models: kimi-k2, kimi-k2-thinking, kimi-k2.5 - CLI `--kimi-login` command for device flow auth - Token management with automatic refresh - Thinking/reasoning effort support for thinking-enabled models Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
26 lines
766 B
Go
26 lines
766 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.GetTokenStore()
|
|
manager := sdkAuth.NewManager(store,
|
|
sdkAuth.NewGeminiAuthenticator(),
|
|
sdkAuth.NewCodexAuthenticator(),
|
|
sdkAuth.NewClaudeAuthenticator(),
|
|
sdkAuth.NewQwenAuthenticator(),
|
|
sdkAuth.NewIFlowAuthenticator(),
|
|
sdkAuth.NewAntigravityAuthenticator(),
|
|
sdkAuth.NewKimiAuthenticator(),
|
|
)
|
|
return manager
|
|
}
|