model.go 402 B

123456789101112131415161718192021
  1. package model
  2. import "time"
  3. type TokenType string
  4. const (
  5. TokenTypeAccess TokenType = "access_token"
  6. TokenTypeRefresh TokenType = "refresh_token"
  7. )
  8. type OauthToken struct {
  9. Token string
  10. ExpiredAt time.Time
  11. RefreshToken string
  12. RTokenExpiredAt time.Time
  13. Id string
  14. }
  15. type TokenClaim struct {
  16. Id string `json:"user_id"`
  17. Timestamp int64 `json:"timestamp"`
  18. }