update satoken 1.34.0 => 1.35.0.RC 优化过期配置 支持多端token自定义有效期

This commit is contained in:
疯狂的狮子Li
2023-06-25 22:11:24 +08:00
parent 2528ecc3d2
commit 45d062af63
6 changed files with 26 additions and 8 deletions

View File

@@ -45,7 +45,7 @@ public class SysUserOnlineController extends BaseController {
for (String key : keys) {
String token = StringUtils.substringAfterLast(key, ":");
// 如果已经过期则踢下线
if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(token) < -1) {
if (StpUtil.stpLogic.getTokenActiveTimeoutByToken(token) < -1) {
continue;
}
userOnlineList.add(RedisUtils.getCacheObject(CacheConstants.ONLINE_TOKEN_KEY + token));

View File

@@ -442,7 +442,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
keys.parallelStream().forEach(key -> {
String token = StringUtils.substringAfterLast(key, ":");
// 如果已经过期则跳过
if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(token) < -1) {
if (StpUtil.stpLogic.getTokenActiveTimeoutByToken(token) < -1) {
return;
}
LoginUser loginUser = LoginHelper.getLoginUser(token);