mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update satoken 1.34.0 => 1.35.0.RC 优化过期配置 支持多端token自定义有效期
This commit is contained in:
@ -442,11 +442,11 @@ 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);
|
||||
if (loginUser.getRoles().stream().anyMatch(r -> r.getRoleId().equals(roleId))) {
|
||||
if (ObjectUtil.isNotNull(loginUser) && loginUser.getRoles().stream().anyMatch(r -> r.getRoleId().equals(roleId))) {
|
||||
try {
|
||||
StpUtil.logoutByTokenValue(token);
|
||||
} catch (NotLoginException ignored) {
|
||||
|
Reference in New Issue
Block a user