[FIX][STYLE] Incorrect send AuthException for User not found

This commit is contained in:
microwin7 2023-05-06 04:51:09 +03:00
parent d4eabbc4c0
commit 220f70915a

View file

@ -136,7 +136,7 @@ public AuthManager.AuthReport refreshAccessToken(String refreshToken, AuthRespon
public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext context, AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) throws IOException { public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext context, AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) throws IOException {
SQLUser SQLUser = (SQLUser) getUserByLogin(login); SQLUser SQLUser = (SQLUser) getUserByLogin(login);
if (SQLUser == null) { if (SQLUser == null) {
throw AuthException.wrongPassword(); throw AuthException.userNotFound();
} }
if (context != null) { if (context != null) {
AuthPlainPassword plainPassword = (AuthPlainPassword) password; AuthPlainPassword plainPassword = (AuthPlainPassword) password;