sharedutils/auth/auth.go

38 lines
512 B
Go
Raw Permalink Normal View History

2023-01-14 21:17:27 +00:00
package sharedauth
2023-01-15 12:20:34 +00:00
import "time"
type InstallIdRegisterReq struct {
InstallId InstallId
}
type InstallId string
func (id InstallId) Validate() bool {
//TODO: More checks
return id != ""
}
type RedirResp struct {
RedirectUrl string
}
type LauncherSession struct {
2023-01-15 14:03:31 +00:00
// Username string
2023-01-15 12:20:34 +00:00
// DiscordId string
SessionToken string
InstallId string
Expiry time.Time
}
2023-01-15 14:03:31 +00:00
type ProfileResp struct {
Username string
}
2023-01-15 12:20:34 +00:00
type ValidateReq struct {
LauncherToken string
}
type ValidateResp struct {
2023-01-14 21:17:27 +00:00
}