fix: 登录失效时间改为6小时和取消刷新失效时间
This commit is contained in:
@@ -10,7 +10,7 @@ public class CacheConstants
|
||||
/**
|
||||
* 缓存有效期,默认720(分钟)
|
||||
*/
|
||||
public final static long EXPIRATION = 720;
|
||||
public final static long EXPIRATION = 360;
|
||||
|
||||
/**
|
||||
* 缓存刷新时间,默认120(分钟)
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package org.wfc.common.security.service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.wfc.common.core.constant.CacheConstants;
|
||||
import org.wfc.common.core.constant.SecurityConstants;
|
||||
import org.wfc.common.core.domain.LoginUser;
|
||||
import org.wfc.common.core.utils.JwtUtils;
|
||||
import org.wfc.common.core.utils.ServletUtils;
|
||||
import org.wfc.common.core.utils.StringUtils;
|
||||
@@ -17,10 +14,14 @@ import org.wfc.common.core.utils.ip.IpUtils;
|
||||
import org.wfc.common.core.utils.uuid.IdUtils;
|
||||
import org.wfc.common.redis.service.RedisService;
|
||||
import org.wfc.common.security.utils.SecurityUtils;
|
||||
import org.wfc.common.core.domain.LoginUser;
|
||||
import org.wfc.system.api.domain.SysUser;
|
||||
import org.wfc.user.api.domain.UUser;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* token验证处理
|
||||
*
|
||||
@@ -165,7 +166,7 @@ public class TokenService
|
||||
long currentTime = System.currentTimeMillis();
|
||||
if (expireTime - currentTime <= MILLIS_MINUTE_TEN)
|
||||
{
|
||||
refreshToken(loginUser);
|
||||
// refreshToken(loginUser);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user