yinbentan
2024-09-26 2030ec81f18f4ec9ea1800f13046acafff6d50f7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package request
 
import (
    "aps_crm/constvar"
    "github.com/golang-jwt/jwt/v4"
)
 
// Custom claims structure
type CustomClaims struct {
    BaseClaims
    BufferTime int64
    jwt.StandardClaims
    CrmUserId  int
    NickName   string
    SubUserIds []int //包含自身的id
}
 
type BaseClaims struct {
    UserId      string
    Username    string
    ParentId    string
    UserType    constvar.UserType
    AuthorityId uint
    ModifiedPwd *bool
}