Commit 7970f0e4 authored by zhouxudong's avatar zhouxudong

更改 jwt过期时间

parent 58d4e68c
......@@ -102,7 +102,7 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
throw new ServiceException("当前用户密码输入错误");
}
String token = JwtTokenUtil.createToken(sysUserInfo, null);
RedisUtil.set(Constants.token + token, sysUserInfo.getUserId(), 15, TimeUnit.DAYS);
RedisUtil.set(Constants.token + token, sysUserInfo.getUserId(), JwtTokenUtil.expireTime, TimeUnit.MILLISECONDS);
return token;
}
......@@ -130,7 +130,7 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
throw new ServiceException("验证码有误");
}
String token = JwtTokenUtil.createToken(sysUserInfo, null);
RedisUtil.set(Constants.token + token, sysUserInfo.getUserId(), 15, TimeUnit.DAYS);
RedisUtil.set(Constants.token + token, sysUserInfo.getUserId(), JwtTokenUtil.expireTime, TimeUnit.MILLISECONDS);
return token;
}
/**
......
......@@ -25,8 +25,8 @@ import java.util.Map;
*/
@Slf4j
public class JwtTokenUtil {
private static Long expireTime = 28800000L;
//15天
public static Long expireTime = 1296000000L;
/**
* 采用HS256算法生成token
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment