|
@@ -149,6 +149,13 @@ public class SysUserFacade extends SysUserServiceImpl {
|
|
jwtStore.setAccessToken(jwt.getAccess_token());
|
|
jwtStore.setAccessToken(jwt.getAccess_token());
|
|
jwtStore.setRefreshToken(jwt.getRefresh_token());
|
|
jwtStore.setRefreshToken(jwt.getRefresh_token());
|
|
tokenFacade.createToken(jwtStore);
|
|
tokenFacade.createToken(jwtStore);
|
|
|
|
+ /***
|
|
|
|
+ * 未加密密码复杂度判断
|
|
|
|
+ */
|
|
|
|
+/* Boolean passwordRegular = passwordRegular(password);
|
|
|
|
+ if(!passwordRegular){
|
|
|
|
+ data.setPasswordComplexity("密码复杂度过低,请及时修改密码");
|
|
|
|
+ }*/
|
|
return data;
|
|
return data;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -257,7 +264,10 @@ public class SysUserFacade extends SysUserServiceImpl {
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_NULL,
|
|
"原密码和新密码不能相同");
|
|
"原密码和新密码不能相同");
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+/* Boolean regularBoolean = passwordRegular(modifyPassword);
|
|
|
|
+ if(!regularBoolean){
|
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确格式的新密码");
|
|
|
|
+ }*/
|
|
String userId = SysUserUtils.getCurrentPrincipleID();
|
|
String userId = SysUserUtils.getCurrentPrincipleID();
|
|
SysUser user = this.getOne(new QueryWrapper<SysUser>()
|
|
SysUser user = this.getOne(new QueryWrapper<SysUser>()
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
@@ -281,6 +291,16 @@ public class SysUserFacade extends SysUserServiceImpl {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 未加密密文正则表达式 至少8个字符,至少1个大写字母,1个小写字母,1个数字和1个特殊字符:
|
|
|
|
+ * @param password
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public Boolean passwordRegular(String password){
|
|
|
|
+ String regex="^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[$@$!%*?&])[A-Za-z\\d$@$!%*?&]{8,}";
|
|
|
|
+ boolean check=password.matches(regex);
|
|
|
|
+ return check;
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 登录
|
|
* 登录
|
|
*
|
|
*
|