feat: 删除不等于 不包含

This commit is contained in:
fit2cloud-chenyw
2021-06-16 18:03:59 +08:00
parent c9518c2e4e
commit a8b9a4fbb2
5 changed files with 129 additions and 5 deletions

View File

@@ -60,10 +60,18 @@ public class F2CRealm extends AuthorizingRealm {
CacheUtils.get("lic_info", "lic");
}catch (Exception e) {
LogUtil.error(e);
throw new AuthenticationException("lic error");
}
String token = (String) auth.getCredentials();
// 解密获得username用于和数据库进行对比
TokenInfo tokenInfo = JWTUtils.tokenInfoByToken(token);
TokenInfo tokenInfo = null;
String token = null;
try {
token = (String) auth.getCredentials();
// 解密获得username用于和数据库进行对比
tokenInfo = JWTUtils.tokenInfoByToken(token);
}catch (Exception e) {
throw new AuthenticationException(e);
}
Long userId = tokenInfo.getUserId();
String username = tokenInfo.getUsername();
if (username == null) {