package
module
Version:
v0.0.0-...-c3d6c2b
Opens a new window with list of versions in this module.
Published: Dec 25, 2021
License: MIT
Opens a new window with license information.
Imports: 14
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
¶
msauth
minecraft的微软验证登陆
使用
1.调用SetClient(clientID,clientSecret)设置clientID,一般clientSecret留空,clientid要先向azure申请,具体见https://wiki.vg/Microsoft_Authentication_Scheme
2.Login()登陆即可获取玩家档案和AccessToken
具体例子见example/example.go
Documentation
¶
func SetClient(id, secret string)
SetClient 来自microsoft的clientID和secret
type AuthResp struct {
IssueInstant time.Time `json:"IssueInstant"`
NotAfter time.Time `json:"NotAfter"`
Token string `json:"Token"`
DisplayClaims struct {
XUI []struct {
UHS string `json:"uhs"`
} `json:"xui"`
} `json:"DisplayClaims"`
}
type Profile struct {
Id string `json:"id"`
Name string `json:"name"`
Skins []struct {
Id string `json:"id"`
State string `json:"state"`
URL string `json:"url"`
Variant string `json:"variant"`
Alias string `json:"alias"`
} `json:"skins"`
Capes interface{} `json:"capes"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.