mirror of
https://github.com/router-for-me/CLIProxyAPIPlus.git
synced 2026-03-22 00:50:26 +00:00
Add OAuth support for Gemini CLI, Claude, Codex, and Qwen authentication
- Implemented new handlers (`RequestGeminiCLIToken`, `RequestAnthropicToken`, `RequestCodexToken`, `RequestQwenToken`) for initiating OAuth flows. - Added endpoints for authorization URLs in management API. - Extracted `GenerateRandomState` to a reusable utility in `misc` package. - Refactored related logic in `openai_login.go` and `anthropic_login.go` for consistency. Add endpoints for initiating OAuth flows in management API documentation - Documented new endpoints for Anthropic, Codex, Gemini CLI, and Qwen login URLs. - Provided request and response examples for each endpoint in both English and Chinese versions.
This commit is contained in:
@@ -211,6 +211,12 @@ func (s *Server) setupRoutes() {
|
||||
mgmt.GET("/auth-files/download", s.mgmt.DownloadAuthFile)
|
||||
mgmt.POST("/auth-files", s.mgmt.UploadAuthFile)
|
||||
mgmt.DELETE("/auth-files", s.mgmt.DeleteAuthFile)
|
||||
|
||||
mgmt.GET("/anthropic-auth-url", s.mgmt.RequestAnthropicToken)
|
||||
mgmt.GET("/codex-auth-url", s.mgmt.RequestCodexToken)
|
||||
mgmt.GET("/gemini-cli-auth-url", s.mgmt.RequestGeminiCLIToken)
|
||||
mgmt.GET("/qwen-auth-url", s.mgmt.RequestQwenToken)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user