Documentation
¶
Index ¶
- Constants
- Variables
- func ClaudeAuthorizeURL(redirectURI, challenge, state string) string
- func DecodeJWT(token string) (map[string]any, error)
- func NewState() (string, error)
- func OpenAIAuthorizeURL(redirectURI, challenge, state string) string
- func OpenBrowser(rawurl string) error
- type AuthorizeRequest
- type Callback
- type CallbackResult
- type Claims
- type PKCE
Constants ¶
View Source
const ( OpenAIClientID = "app_EMoamEEZ73f0CkXaXp7hrann" OpenAIAuthURL = "https://auth.openai.com/oauth/authorize" OpenAITokenURL = "https://auth.openai.com/oauth/token" OpenAICallbackPath = "/auth/callback" ClaudeClientID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e" ClaudeAuthURL = "https://claude.ai/oauth/authorize" ClaudeCallbackPath = "/callback" )
Variables ¶
View Source
var ClaudeCallbackPorts = []int{1461, 1462, 1463, 1464, 1465, 1466}
View Source
var ClaudeScopes = []string{"org:create_api_key", "user:profile", "user:inference", "user:sessions:claude_code", "user:file_upload"}
View Source
var OpenAICallbackPorts = []int{1455, 1456, 1457, 1458, 1459, 1460}
View Source
var OpenAIScopes = []string{"openid", "profile", "email", "offline_access"}
Functions ¶
func ClaudeAuthorizeURL ¶
func OpenAIAuthorizeURL ¶
func OpenBrowser ¶
Types ¶
type AuthorizeRequest ¶
type AuthorizeRequest struct {
ClientID string
RedirectURI string
Challenge string
State string
Scopes []string
Extra url.Values
}
func (AuthorizeRequest) URL ¶
func (r AuthorizeRequest) URL() string
type Callback ¶
type Callback struct {
// contains filtered or unexported fields
}
func StartClaudeCallback ¶
func StartOpenAICallback ¶
func (*Callback) RedirectURI ¶
type CallbackResult ¶
Click to show internal directories.
Click to hide internal directories.