去掉密码验证

This commit is contained in:
黎润豪 2026-02-05 11:30:24 +08:00
parent 1593720260
commit 022f7b81a8
2 changed files with 1 additions and 14 deletions

View File

@ -57,7 +57,7 @@ public class PenaltySecurityController {
if (StringUtils.notEquals(byId.getAppSecret(), appSecret)) { if (StringUtils.notEquals(byId.getAppSecret(), appSecret)) {
return SecurityResultVO.error(ErrorCode.APP_SECRET_INVALID); return SecurityResultVO.error(ErrorCode.APP_SECRET_INVALID);
} }
if (StringUtils.isBlank(paramDto.getAccount()) || StringUtils.isBlank(paramDto.getPassword())) { if (StringUtils.isBlank(paramDto.getAccount())) {
return SecurityResultVO.error(ErrorCode.LOGIN_INFO_INVALID); return SecurityResultVO.error(ErrorCode.LOGIN_INFO_INVALID);
} }
TUsers one = tUsersService.lambdaQuery().eq(TUsers::getUsername, paramDto.getAccount()) TUsers one = tUsersService.lambdaQuery().eq(TUsers::getUsername, paramDto.getAccount())
@ -65,15 +65,6 @@ public class PenaltySecurityController {
if (one == null) { if (one == null) {
return SecurityResultVO.error(ErrorCode.LOGIN_INFO_INVALID); return SecurityResultVO.error(ErrorCode.LOGIN_INFO_INVALID);
} }
try {
if (StringUtils.notEquals(PasswordVerify.DecodePassword(one.getPassword()), paramDto.getPassword())) {
return SecurityResultVO.error(ErrorCode.LOGIN_INFO_INVALID);
}
} catch (CryptException e) {
log.error("用户密码解密失败", e);
return SecurityResultVO.error(ErrorCode.LOGIN_INFO_INVALID);
}
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(SecurityResultVO.success())); JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(SecurityResultVO.success()));
jsonObject.put("access_token", penaltyAppInfoService.generateAccessToken(byId, one)); jsonObject.put("access_token", penaltyAppInfoService.generateAccessToken(byId, one));
return jsonObject; return jsonObject;

View File

@ -4,7 +4,6 @@ import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -27,7 +26,4 @@ public class LoginInfoParamDto implements Serializable {
@JSONField(name = "account") @JSONField(name = "account")
private String account; private String account;
@JSONField(name = "password")
private String password;
} }