jwt.go 325 B

123456789101112131415161718192021
  1. package request
  2. import (
  3. jwt "github.com/golang-jwt/jwt/v5"
  4. "github.com/google/uuid"
  5. )
  6. // CustomClaims structure
  7. type CustomClaims struct {
  8. BaseClaims
  9. BufferTime int64
  10. jwt.RegisteredClaims
  11. }
  12. type BaseClaims struct {
  13. UUID uuid.UUID
  14. ID uint
  15. Username string
  16. NickName string
  17. AuthorityId uint
  18. }