给登录接口增加密码复杂度提示
This commit is contained in:
@@ -469,7 +469,7 @@ public class UserController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping(value = "/infoWithTenant")
|
@GetMapping(value = "/infoWithTenant")
|
||||||
@ApiOperation(value = "获取当前用户的用户数量和租户信息")
|
@ApiOperation(value = "获取当前用户的用户数量和租户信息")
|
||||||
public BaseResponseInfo randomImage(HttpServletRequest request){
|
public BaseResponseInfo infoWithTenant(HttpServletRequest request){
|
||||||
BaseResponseInfo res = new BaseResponseInfo();
|
BaseResponseInfo res = new BaseResponseInfo();
|
||||||
try {
|
try {
|
||||||
Map<String, Object> data = new HashMap<>();
|
Map<String, Object> data = new HashMap<>();
|
||||||
|
|||||||
@@ -390,6 +390,11 @@ public class UserService {
|
|||||||
}
|
}
|
||||||
data.put("msgTip", msgTip);
|
data.put("msgTip", msgTip);
|
||||||
if(user!=null){
|
if(user!=null){
|
||||||
|
//校验下密码是不是过于简单
|
||||||
|
boolean pwdSimple = false;
|
||||||
|
if(user.getPassword().equals(Tools.md5Encryp(BusinessConstants.USER_DEFAULT_PASSWORD))) {
|
||||||
|
pwdSimple = true;
|
||||||
|
}
|
||||||
user.setPassword(null);
|
user.setPassword(null);
|
||||||
redisService.storageObjectBySession(token,"clientIp", Tools.getLocalIp(request));
|
redisService.storageObjectBySession(token,"clientIp", Tools.getLocalIp(request));
|
||||||
logService.insertLogWithUserId(user.getId(), user.getTenantId(), "用户",
|
logService.insertLogWithUserId(user.getId(), user.getTenantId(), "用户",
|
||||||
@@ -397,6 +402,7 @@ public class UserService {
|
|||||||
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||||
data.put("token", token);
|
data.put("token", token);
|
||||||
data.put("user", user);
|
data.put("user", user);
|
||||||
|
data.put("pwdSimple", pwdSimple);
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user