【JWT过期时间修改为5天】
This commit is contained in:
parent
3cbaf3b3b9
commit
e83042bb2a
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue