Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(request []byte) (IdentityData, ClientData, error)
Types ¶
type ClientData ¶
type ClientData struct { jwt.RegisteredClaims // ServerAddress is the exact address the player used to join the server with. This may be either an // actual address, or a hostname. ServerAddress also has the port in it, in the shape of // 'address:port`. ServerAddress string }
ClientData is a container of client specific data of a Login packet. It holds data such as the skin of a player, but also its language code and device information.
type IdentityData ¶
type IdentityData struct { // DisplayName is the username of the player, which may be changed by the user. It should for that reason // not be used as a key to store information. DisplayName string `json:"displayName"` }
IdentityData contains identity data of the player logged in. It is found in one of the JWT claims signed by Mojang, and can thus be trusted.
Click to show internal directories.
Click to hide internal directories.