【auth】暂时关掉密码传输加密解密

pull/3/head
fengshuonan 2020-12-21 21:33:47 +08:00
parent 079884ec94
commit 65b6a875e6
1 changed files with 2 additions and 2 deletions

View File

@ -141,14 +141,14 @@ public class AuthServiceImpl implements AuthServiceApi {
} }
// 2. 解密密码的密文 // 2. 解密密码的密文
String decryptPassword = passwordTransferEncryptApi.decrypt(loginRequest.getPassword()); // String decryptPassword = passwordTransferEncryptApi.decrypt(loginRequest.getPassword());
// 3. 获取用户密码的加密值和用户的状态 // 3. 获取用户密码的加密值和用户的状态
UserLoginInfoDTO userValidateInfo = userServiceApi.getUserLoginInfo(loginRequest.getAccount()); UserLoginInfoDTO userValidateInfo = userServiceApi.getUserLoginInfo(loginRequest.getAccount());
// 4. 校验用户密码是否正确(BCrypt算法) // 4. 校验用户密码是否正确(BCrypt算法)
if (validatePassword) { if (validatePassword) {
Boolean checkResult = passwordStoredEncryptApi.checkPassword(decryptPassword, userValidateInfo.getUserPasswordHexed()); Boolean checkResult = passwordStoredEncryptApi.checkPassword(loginRequest.getPassword(), userValidateInfo.getUserPasswordHexed());
if (!checkResult) { if (!checkResult) {
throw new AuthException(AuthExceptionEnum.USERNAME_PASSWORD_ERROR); throw new AuthException(AuthExceptionEnum.USERNAME_PASSWORD_ERROR);
} }