Documentation ¶
Index ¶
Constants ¶
View Source
const ( EntitlementMinecraftProduct = "product_minecraft" EntitlementMinecraftGame = "game_minecraft" EntitlementMinecraftBedrockProduct = "product_minecraft_bedrock" EntitlementMinecraftBedrockGame = "game_minecraft_bedrock" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type AuthResponse ¶
type AuthResponse struct { Username string `json:"username"` Roles []interface{} `json:"roles"` AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` }
func LoginWithXbox ¶
func LoginWithXbox(userHash string, xstsToken string) (*AuthResponse, error)
type AuthorizedAPI ¶
type AuthorizedAPI struct {
// contains filtered or unexported fields
}
func NewAuthorizedAPI ¶
func NewAuthorizedAPI(token string) AuthorizedAPI
func (*AuthorizedAPI) GetEntitlements ¶
func (a *AuthorizedAPI) GetEntitlements() (*EntitlementsResponse, error)
func (*AuthorizedAPI) GetProfile ¶
func (a *AuthorizedAPI) GetProfile() (*Profile, error)
type Entitlement ¶
type EntitlementsResponse ¶
type EntitlementsResponse struct { Items []Entitlement `json:"items"` Signature string `json:"signature"` KeyId string `json:"keyId"` RequestId string `json:"requestId"` }
func (*EntitlementsResponse) ReadSignature ¶
func (r *EntitlementsResponse) ReadSignature() (jwt.Token, error)
Click to show internal directories.
Click to hide internal directories.