Documentation ¶
Index ¶
- Constants
- func GetArkoseToken(url string) (string, error)
- func NewHttpClient(proxyUrl string) tls_client.HttpClient
- type AccountCookies
- type ArkoseToken
- type Error
- type Result
- type UserLogin
- func (userLogin *UserLogin) Begin() *Error
- func (userLogin *UserLogin) CheckPassword(state string, username string, password string) (string, int, error)
- func (userLogin *UserLogin) CheckUsername(state string, username string) (int, error)
- func (userLogin *UserLogin) GetAccessToken() string
- func (userLogin *UserLogin) GetAccessTokenInternal(code string) (string, int, string, error)
- func (userLogin *UserLogin) GetAuthResult() Result
- func (userLogin *UserLogin) GetAuthorizedUrl(csrfToken string) (string, int, error)
- func (userLogin *UserLogin) GetPUID() (string, *Error)
- func (userLogin *UserLogin) GetState(authorizedUrl string) (string, int, error)
- func (userLogin *UserLogin) GetToken(arkose string) (int, string, string, string)
- func (userLogin *UserLogin) RenewWithCookies() *Error
- func (userLogin *UserLogin) ResetCookies()
- func (userLogin *UserLogin) SaveCookies() *Error
Constants ¶
View Source
const ( AuthorizationHeader = "Authorization" XAuthorizationHeader = "X-Authorization" ContentType = "application/x-www-form-urlencoded" UserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" Auth0Url = "https://auth0.openai.com" LoginUsernameUrl = Auth0Url + "/u/login/identifier?state=" LoginPasswordUrl = Auth0Url + "/u/login/password?state=" ParseUserInfoErrorMessage = "Failed to parse user login info." GetAuthorizedUrlErrorMessage = "Failed to get authorized url." GetStateErrorMessage = "Failed to get state." EmailInvalidErrorMessage = "Email is not valid." EmailOrPasswordInvalidErrorMessage = "Email or password is not correct." GetAccessTokenErrorMessage = "Failed to get access token." GetArkoseTokenErrorMessage = "Failed to get arkose token." )
Variables ¶
This section is empty.
Functions ¶
func GetArkoseToken ¶
func NewHttpClient ¶
func NewHttpClient(proxyUrl string) tls_client.HttpClient
Types ¶
type AccountCookies ¶
type UserLogin ¶
type UserLogin struct { Username string Password string Result Result // contains filtered or unexported fields }
func NewAuthenticator ¶
func (*UserLogin) CheckPassword ¶
func (*UserLogin) CheckUsername ¶
func (*UserLogin) GetAccessToken ¶
func (*UserLogin) GetAccessTokenInternal ¶
func (*UserLogin) GetAuthResult ¶
func (*UserLogin) GetAuthorizedUrl ¶
func (*UserLogin) RenewWithCookies ¶
func (*UserLogin) ResetCookies ¶
func (userLogin *UserLogin) ResetCookies()
func (*UserLogin) SaveCookies ¶
Click to show internal directories.
Click to hide internal directories.