feat: add yggdrasil metadata endpoint and support authlib-injector
This commit is contained in:
@@ -86,3 +86,22 @@ type LoginResponse struct {
|
||||
Token string `json:"token"`
|
||||
User *User `json:"user"`
|
||||
}
|
||||
|
||||
// MetaLinks - ссылки в метаданных
|
||||
type MetaLinks struct {
|
||||
Homepage string `json:"homepage,omitempty"`
|
||||
Register string `json:"register,omitempty"`
|
||||
}
|
||||
|
||||
// MetaSkinDomains - домены скинов
|
||||
type MetaSkinDomains struct {
|
||||
Deny []string `json:"deny,omitempty"`
|
||||
}
|
||||
|
||||
// YggdrasilMetadata - структура для ответа на запрос метаданных (/)
|
||||
// См. https://github.com/yushijinhun/authlib-injector/wiki/Yggdrasil-API-Implementation-Spec
|
||||
type YggdrasilMetadata struct {
|
||||
Meta MetaLinks `json:"meta,omitempty"`
|
||||
SkinDomains MetaSkinDomains `json:"skinDomains"`
|
||||
Signature string `json:"signature"` // Public key in PEM format
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user