【JWT过期时间修改为5天】

This commit is contained in:
weizhihong 2023-09-07 13:57:41 +08:00
parent 3cbaf3b3b9
commit e83042bb2a
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ func InitGinJwtMiddleware() (authMiddleware *jwt.GinJWTMiddleware) {
authMiddleware, err := jwt.New(&jwt.GinJWTMiddleware{ authMiddleware, err := jwt.New(&jwt.GinJWTMiddleware{
Realm: "joylink.club", Realm: "joylink.club",
Key: []byte("joylink"), Key: []byte("joylink"),
Timeout: time.Hour, Timeout: 5 * 24 * time.Hour,
// MaxRefresh: time.Hour, // MaxRefresh: time.Hour,
IdentityKey: IdentityKey, IdentityKey: IdentityKey,
PayloadFunc: func(data interface{}) jwt.MapClaims { PayloadFunc: func(data interface{}) jwt.MapClaims {