mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-05-08 05:15:39 +08:00
# Conflicts: # README.md # README_CN.md # README_JA.md # cmd/server/main.go # config.example.yaml # internal/api/handlers/management/auth_files.go # internal/api/server.go # internal/auth/iflow/iflow_auth.go # internal/cmd/auth_manager.go # internal/config/config.go # sdk/cliproxy/auth/oauth_model_alias.go # sdk/cliproxy/auth/types.go # test/thinking_conversion_test.go
29 lines
839 B
Go
29 lines
839 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.
|
|
//
|
|
// 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(),
|
|
sdkAuth.NewKiroAuthenticator(),
|
|
sdkAuth.NewGitHubCopilotAuthenticator(),
|
|
sdkAuth.NewKiloAuthenticator(),
|
|
sdkAuth.NewGitLabAuthenticator(),
|
|
sdkAuth.NewCodeBuddyAuthenticator(),
|
|
sdkAuth.NewCursorAuthenticator(),
|
|
)
|
|
return manager
|
|
}
|