Documentation ¶
Index ¶
- Constants
- Variables
- func Do(req *http.Request) (*http.Response, error)
- func ExtractValue(url, key string) string
- func Match(regex, content string) string
- func PreAuthData(r io.Reader) (string, string, error)
- func VerifyMessage(hash, signature []byte) bool
- func VerifySignature(profilePubKey, signature []byte) bool
- type Auth
- func (a *Auth) ChangeName(name string) error
- func (a *Auth) ChangeSkin(variant, skinURL string) error
- func (a *Auth) HideCape() error
- func (a *Auth) NameAvailable(name string) (bool, error)
- func (a *Auth) ResetSkin() error
- func (a *Auth) SessionID() string
- func (a *Auth) ShowCape(capeid string) error
- type DeviceCodeRequest
- type DeviceCodeResponse
- type KeyPair
- type Microsoft
- type PlayerSession
- type Profile
- type PublicKey
- type XboxLiveAuth
Constants ¶
View Source
const MojangAPI = "https://api.minecraftservices.com"
Variables ¶
View Source
var DefaultAuth = Auth{DefaultProfile, Microsoft{}, KeyPair{}} // Offline-mode by default
View Source
var DefaultProfile = Profile{"Steve", "5627dd98-e6be-3c21-b8a8-e92344183641"}
Functions ¶
func ExtractValue ¶
func VerifyMessage ¶
func VerifySignature ¶
VerifySignature has the same functional as net.minecraft.world.entity.player.ProfilePublicKey.Data#validateSignature
Types ¶
type DeviceCodeRequest ¶
type DeviceCodeResponse ¶
type KeyPair ¶
type KeyPair struct { Pair struct { PrivateKey string `json:"privateKey"` PublicKey string `json:"publicKey"` } `json:"keyPair"` PublicKeySignature string `json:"publicKeySignature"` PublicKeySignatureV2 string `json:"publicKeySignatureV2"` ExpiresAt time.Time `json:"expiresAt"` RefreshedAfter time.Time `json:"refreshedAfter"` }
func (KeyPair) ToSession ¶
func (k KeyPair) ToSession(uuid string) PlayerSession
type PlayerSession ¶
Click to show internal directories.
Click to hide internal directories.