[FIX] Incorrect send AuthException for User not found (#651)

This commit is contained in:
microwin7 2023-05-13 11:49:30 +03:00 committed by GitHub
parent 498325f3e8
commit ae426b2fd0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {
SQLUser SQLUser = (SQLUser) getUserByLogin(login);
if (SQLUser == null) {
throw AuthException.wrongPassword();
throw AuthException.userNotFound();
}
if (context != null) {
AuthPlainPassword plainPassword = (AuthPlainPassword) password;