2023-01-24 13:46:17 +00:00
|
|
|
package sharedauth
|
|
|
|
|
2023-03-11 12:54:52 +00:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
2023-01-24 13:46:17 +00:00
|
|
|
|
|
|
|
type InstallIdRegisterReq struct {
|
|
|
|
InstallId InstallId
|
|
|
|
}
|
|
|
|
|
|
|
|
type InstallId string
|
|
|
|
|
|
|
|
func (id InstallId) Validate() bool {
|
|
|
|
//TODO: More checks
|
|
|
|
return id != ""
|
|
|
|
}
|
|
|
|
|
|
|
|
type RedirResp struct {
|
2023-03-13 09:20:46 +00:00
|
|
|
RedirectUrl string `json:"redirecturl"`
|
2023-01-24 13:46:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type LauncherSession struct {
|
|
|
|
// Username string
|
|
|
|
// DiscordId string
|
|
|
|
SessionToken string
|
|
|
|
InstallId string
|
|
|
|
Expiry time.Time
|
|
|
|
}
|
|
|
|
|
|
|
|
type ProfileResp struct {
|
|
|
|
Username string
|
|
|
|
}
|
|
|
|
|
|
|
|
type ValidateReq struct {
|
|
|
|
LauncherToken string
|
|
|
|
}
|
|
|
|
|
|
|
|
type ValidateResp struct {
|
|
|
|
}
|
2023-03-09 13:54:19 +00:00
|
|
|
|
|
|
|
type SkirdaUser struct {
|
2023-03-13 10:38:16 +00:00
|
|
|
SkirdaUserId string `bson:"skirdauserid" json:"skirdauserid"`
|
|
|
|
DiscordId string `bson:"discordid" json:"-"`
|
|
|
|
Username string `bson:"username" json:"username"`
|
|
|
|
UserDomains []string `bson:"userdomains" json:"userdomains"`
|
|
|
|
Installs []LauncherInstall `bson:"installs" json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type LauncherInstall struct {
|
|
|
|
InstallId string `bson:"installid"`
|
2023-03-09 13:54:19 +00:00
|
|
|
}
|