mirror of
https://gitee.com/dromara/sa-token.git
synced 2025-10-22 03:27:23 +08:00
fix: 将 SaDisableWrapperInfo.createNotDisabled()
默认返回值封禁等级改为 -2,以保证向之前版本兼容
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package cn.dev33.satoken.model.wrapperInfo;
|
||||
|
||||
import cn.dev33.satoken.util.SaTokenConsts;
|
||||
|
||||
/**
|
||||
* 返回值包装类:描述一个账号是否已被封禁等信息
|
||||
*
|
||||
@@ -66,7 +68,7 @@ public class SaDisableWrapperInfo {
|
||||
* @return /
|
||||
*/
|
||||
public static SaDisableWrapperInfo createNotDisabled() {
|
||||
return new SaDisableWrapperInfo(false, 0, 0);
|
||||
return new SaDisableWrapperInfo(false, 0, SaTokenConsts.NOT_DISABLE_LEVEL);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,7 +77,7 @@ public class SaDisableWrapperInfo {
|
||||
* @return /
|
||||
*/
|
||||
public static SaDisableWrapperInfo createNotDisabled(long cacheTime) {
|
||||
return new SaDisableWrapperInfo(false, cacheTime, 0);
|
||||
return new SaDisableWrapperInfo(false, cacheTime, SaTokenConsts.NOT_DISABLE_LEVEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -190,7 +190,7 @@ public class StpLogic {
|
||||
*/
|
||||
public void setTokenValue(String tokenValue, SaLoginModel loginModel){
|
||||
|
||||
// 先判断一下,如果提供 token 为空,则不执行任何动作
|
||||
// 先判断一下,如果提供 token 为空,则不执行任何动作
|
||||
if(SaFoxUtil.isEmpty(tokenValue)) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user