将JWT过期时间 刷新时间 放置进入config

This commit is contained in:
pixel
2020-12-16 13:17:00 +08:00
parent 7613b85271
commit 72fd7beec0
5 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ func GetRedisJWT(userName string) (err error, redisJWT string) {
func SetRedisJWT(jwt string, userName string) (err error) {
// 此处过期时间等于jwt过期时间
timer := 60 * 60 * 24 * 7 * time.Second
timer := time.Duration(global.GVA_CONFIG.JWT.ExpiresTime) * time.Second
err = global.GVA_REDIS.Set(userName, jwt, timer).Err()
return err
}