取消判断同账号免重复登陆

This commit is contained in:
shengzhang 2021-01-10 23:01:34 +08:00
parent 713758c304
commit ac4ac37175
2 changed files with 9 additions and 10 deletions

View File

@ -145,14 +145,6 @@ public class StpLogic {
*/
public void setLoginId(Object loginId, String device) {
// ------ 0如果当前会话已经登录上了此LoginId且登录设备相同则立即返回
Object loggedId = getLoginIdDefaultNull();
if(loggedId != null && loggedId.toString().equals(loginId.toString())) {
String loggedDevice = getLoginDevice();
if(loggedDevice != null && loggedDevice.equals(device)) {
return;
}
}
// ------ 1获取相应对象
HttpServletRequest request = SaTokenManager.getSaTokenServlet().getRequest();

View File

@ -27,7 +27,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
public class SaTokenJwtUtil {
/**
* 秘钥
* 秘钥 (随便手打几个字母就好了)
*/
public static final String BASE64_SECURITY = "79e7c69681b8270162386e6daa53d1dd";
@ -102,6 +102,14 @@ public class SaTokenJwtUtil {
static {
// 判断秘钥
if(BASE64_SECURITY.equals("79e7c69681b8270162386e6daa53d1dd")) {
String warn = "-------------------------------------\n";
warn += "请更换JWT秘钥不要使用示例默认秘钥\n";
warn += "-------------------------------------";
System.err.println(warn);
}
// 修改默认实现
StpUtil.stpLogic = new StpLogic("login") {
@ -207,7 +215,6 @@ public class SaTokenJwtUtil {
};
}