spark-server/internal/module/auth/entity/principal.go
zhr ae9a71034d feat: implement Spark IM V3 modular monolith
Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 19:52:11 +08:00

24 lines
658 B
Go

// Package entity holds auth domain types shared by HTTP Bearer and TCP AUTH.
package entity
import "time"
// Principal is the authenticated identity.
type Principal struct {
UserID int64
DeviceID uint64
JTI string
ExpiresAt time.Time
}
// IssuedToken is the login / refresh `data` payload.
type IssuedToken struct {
AccessToken string `json:"access_token"`
RefreshToken string `json:"refresh_token"`
ExpiresIn int64 `json:"expires_in"`
RefreshExpiresIn int64 `json:"refresh_expires_in"`
UserID int64 `json:"user_id"`
DeviceID uint64 `json:"device_id"`
SparkID string `json:"spark_id"`
}