Merge remote-tracking branch 'origin/dev' into auth-uploads

This commit is contained in:
grngxd 2025-06-08 19:00:09 +01:00
commit 036d20561e
11 changed files with 596 additions and 581 deletions

View file

@ -1,40 +1,40 @@
package auth
import (
"time"
"github.com/golang-jwt/jwt/v5"
)
type TokenResponse struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int64 `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
}
type User struct {
ID string `json:"id" gorm:"primaryKey"`
Username string `json:"username"`
Blacklisted bool `json:"blacklisted"`
Email string `json:"email"`
CreatedAt time.Time `json:"created_at"`
}
type AvatarDecorationData struct {
Asset string
SkuID string
}
type ExchangeCodeRequest struct {
GrantType string `json:"grant_type"`
Code string `json:"code"`
RedirectUri string `json:"redirect_uri"`
}
type Claims struct {
User User `json:"user"`
Exp uint64 `json:"exp"`
jwt.RegisteredClaims
}
package auth
import (
"time"
"github.com/golang-jwt/jwt/v5"
)
type TokenResponse struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int64 `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
}
type User struct {
ID string `json:"id" gorm:"primaryKey"`
Username string `json:"username"`
Blacklisted bool `json:"blacklisted"`
Email string `json:"email"`
CreatedAt time.Time `json:"created_at"`
}
type AvatarDecorationData struct {
Asset string
SkuID string
}
type ExchangeCodeRequest struct {
GrantType string `json:"grant_type"`
Code string `json:"code"`
RedirectUri string `json:"redirect_uri"`
}
type Claims struct {
User User `json:"user"`
Exp uint64 `json:"exp"`
jwt.RegisteredClaims
}