Documentation ¶
Index ¶
- Constants
- func Die(err error)
- func Exchange(code string) (*oauth2.Token, error)
- func GetGameSession(idToken string) (string, error)
- func LaunchGame(sessionId string, account *Account) error
- func Login() error
- func ParseIdToken(idToken string) (map[string]interface{}, error)
- func ParseIntentPayload(payload string) map[string]string
- func ReadFromConfigFile(filename string) (string, error)
- func WriteToConfigFile(content string, filename string) error
- type Account
- type NoAccountChosenError
- type Tuple
- type UserDetails
Constants ¶
View Source
const ( ClientID = "com_jagex_auth_desktop_launcher" StandardLoginClientID = "1fddee4e-b100-4f4e-b2b0-097f9088f9d2" LoginProvider = "runescape" AuthUrl = "https://account.jagex.com/oauth2/auth" TokenUrl = "https://account.jagex.com/oauth2/token" RedirectUrl = "https://secure.runescape.com/m=weblogin/launcher-redirect" ApiUrl = "https://api.jagex.com/v1" ProfileApiUrl = "https://secure.jagex.com/rs-profile/v1" ShieldUrl = "https://auth.jagex.com/shield/oauth/token" GameSessionApiUrl = "https://auth.jagex.com/game-session/v1" OsrsBasicAuthHeader = "Basic Y29tX2phZ2V4X2F1dGhfZGVza3RvcF9vc3JzOnB1YmxpYw==" )
Variables ¶
This section is empty.
Functions ¶
func GetGameSession ¶
func LaunchGame ¶
func ParseIdToken ¶
func ParseIntentPayload ¶
func ReadFromConfigFile ¶
func WriteToConfigFile ¶
Types ¶
type Account ¶
type Account struct { AccountId string `json:"accountId"` DisplayName string `json:"displayName"` UserHash string `json:"userHash"` }
func GetAccounts ¶
func GetChosenAccount ¶
func GetChosenAccount(user *UserDetails, accounts []Account) (*Account, error)
func (Account) FilterValue ¶
type NoAccountChosenError ¶
type NoAccountChosenError struct{}
func (*NoAccountChosenError) Error ¶
func (e *NoAccountChosenError) Error() string
type UserDetails ¶
type UserDetails struct { DisplayName string `json:"displayName"` Id string `json:"id"` Suffix string `json:"suffix"` UserId string `json:"userId"` }
func GetUserDetails ¶
func GetUserDetails(sub string, accessToken string) (*UserDetails, error)
Click to show internal directories.
Click to hide internal directories.