wangpengfei
2023-08-24 487b20629178159396a93460f7355f5ebee7a8a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package request
 
import (
    "github.com/gofrs/uuid/v5"
    jwt "github.com/golang-jwt/jwt/v4"
)
 
// Custom claims structure
type CustomClaims struct {
    BaseClaims
    BufferTime int64
    jwt.RegisteredClaims
}
 
type BaseClaims struct {
    UUID        uuid.UUID
    ID          uint
    Username    string
    NickName    string
    AuthorityId uint
}