mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 21:10:51 +08:00
refactor(auth): extract Antigravity OAuth constants to internal/auth
This commit is contained in:
34
internal/auth/antigravity/constants.go
Normal file
34
internal/auth/antigravity/constants.go
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
// Package antigravity provides OAuth2 authentication functionality for the Antigravity provider.
|
||||||
|
package antigravity
|
||||||
|
|
||||||
|
// OAuth client credentials and configuration
|
||||||
|
const (
|
||||||
|
ClientID = "1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com"
|
||||||
|
ClientSecret = "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"
|
||||||
|
CallbackPort = 51121
|
||||||
|
)
|
||||||
|
|
||||||
|
// Scopes defines the OAuth scopes required for Antigravity authentication
|
||||||
|
var Scopes = []string{
|
||||||
|
"https://www.googleapis.com/auth/cloud-platform",
|
||||||
|
"https://www.googleapis.com/auth/userinfo.email",
|
||||||
|
"https://www.googleapis.com/auth/userinfo.profile",
|
||||||
|
"https://www.googleapis.com/auth/cclog",
|
||||||
|
"https://www.googleapis.com/auth/experimentsandconfigs",
|
||||||
|
}
|
||||||
|
|
||||||
|
// OAuth2 endpoints for Google authentication
|
||||||
|
const (
|
||||||
|
TokenEndpoint = "https://oauth2.googleapis.com/token"
|
||||||
|
AuthEndpoint = "https://accounts.google.com/o/oauth2/v2/auth"
|
||||||
|
UserInfoEndpoint = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Antigravity API configuration
|
||||||
|
const (
|
||||||
|
APIEndpoint = "https://cloudcode-pa.googleapis.com"
|
||||||
|
APIVersion = "v1internal"
|
||||||
|
APIUserAgent = "google-api-nodejs-client/9.15.1"
|
||||||
|
APIClient = "google-cloud-sdk vscode_cloudshelleditor/0.1"
|
||||||
|
ClientMetadata = `{"ideType":"IDE_UNSPECIFIED","platform":"PLATFORM_UNSPECIFIED","pluginType":"GEMINI"}`
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user