Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Payload ¶
type Payload struct { Agent `json:"agent"` UserName string `json:"username"` Password string `json:"password"` ClientToken string `json:"clientToken"` RequestUser bool `json:"requestUser"` }
Payload is a authenticate request struct
type Response ¶
type Response struct { Error string `json:"error"` ErrorMessage string `json:"errorMessage"` Cause string `json:"cause"` AccessToken string `json:"accessToken"` ClientToken string `json:"clientToken"` // identical to the one received AvailableProfiles []struct { ID string `json:"ID"` // hexadecimal Name string `json:"name"` Legacy bool `json:"legacy"` // In practice, this field only appears in the response if true. Default to false. } `json:"availableProfiles"` // only present if the agent field was received SelectedProfile struct { ID string `json:"id"` Name string `json:"name"` Legacy bool `json:"legacy"` } `json:"selectedProfile"` User struct { ID string `json:"id"` // hexadecimal Properties []struct { Name string `json:"name"` Value string `json:"value"` } } `json:"user"` }
Response is the response from Mojang's auth server
func Authenticate ¶
Authenticate authenticates a user using their password.
Click to show internal directories.
Click to hide internal directories.