jwt.go 328 B

123456789101112131415161718192021
  1. package request
  2. import (
  3. "github.com/gofrs/uuid/v5"
  4. jwt "github.com/golang-jwt/jwt/v4"
  5. )
  6. // Custom claims 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. }