zhangqian
2023-08-26 5193dcb9336e853502baf8a539d3f45efebe2f86
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
}