去掉密码验证
This commit is contained in:
parent
1593720260
commit
022f7b81a8
|
|
@ -57,7 +57,7 @@ public class PenaltySecurityController {
|
|||
if (StringUtils.notEquals(byId.getAppSecret(), appSecret)) {
|
||||
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);
|
||||
}
|
||||
TUsers one = tUsersService.lambdaQuery().eq(TUsers::getUsername, paramDto.getAccount())
|
||||
|
|
@ -65,15 +65,6 @@ public class PenaltySecurityController {
|
|||
if (one == null) {
|
||||
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.put("access_token", penaltyAppInfoService.generateAccessToken(byId, one));
|
||||
return jsonObject;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.alibaba.fastjson.annotation.JSONField;
|
|||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
|
|
@ -27,7 +26,4 @@ public class LoginInfoParamDto implements Serializable {
|
|||
|
||||
@JSONField(name = "account")
|
||||
private String account;
|
||||
|
||||
@JSONField(name = "password")
|
||||
private String password;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue