File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,12 @@ package middleware
22
33import (
44 "errors"
5+ "strconv"
6+ "time"
7+
58 "github.com/flipped-aurora/gin-vue-admin/server/global"
69 "github.com/flipped-aurora/gin-vue-admin/server/utils"
710 "github.com/golang-jwt/jwt/v5"
8- "strconv"
9- "time"
1011
1112 "github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
1213 "github.com/gin-gonic/gin"
@@ -59,7 +60,7 @@ func JWTAuth() gin.HandlerFunc {
5960 newClaims , _ := j .ParseToken (newToken )
6061 c .Header ("new-token" , newToken )
6162 c .Header ("new-expires-at" , strconv .FormatInt (newClaims .ExpiresAt .Unix (), 10 ))
62- utils .SetToken (c , newToken , int (dr .Seconds ()))
63+ utils .SetToken (c , newToken , int (dr .Seconds ()/ 60 ))
6364 if global .GVA_CONFIG .System .UseMultipoint {
6465 // 记录新的活跃jwt
6566 _ = utils .SetRedisJWT (newToken , newClaims .Username )
You can’t perform that action at this time.
0 commit comments