diff --git a/src/main/java/su/xserver/iikocon/AuthHandler.java b/src/main/java/su/xserver/iikocon/AuthHandler.java index 50439b2..0185296 100644 --- a/src/main/java/su/xserver/iikocon/AuthHandler.java +++ b/src/main/java/su/xserver/iikocon/AuthHandler.java @@ -24,10 +24,8 @@ public class AuthHandler { userService.findByLoginOrEmail(login).onComplete(ar -> { if (ar.succeeded() && ar.result() != null) { JsonObject user = ar.result(); - System.out.println("User found: " + user.encode()); boolean passwordOk = userService.checkPassword(password, user.getString("password")); - System.out.println("Password OK: " + passwordOk); if (passwordOk) { // Надёжное получение флага активности @@ -37,10 +35,8 @@ public class AuthHandler { Integer activeInt = user.getInteger("active"); active = activeInt != null && activeInt == 1; } - System.out.println("Active flag: " + active); if (!active) { - System.out.println("Sending: Account not activated"); ctx.response().setStatusCode(401).end("Account not activated"); return; } @@ -50,11 +46,9 @@ public class AuthHandler { session.put("login", user.getString("login")); ctx.response().end(new JsonObject().put("success", true).put("login", user.getString("login")).encode()); } else { - System.out.println("Sending: Invalid credentials (password mismatch)"); ctx.response().setStatusCode(401).end("Invalid credentials"); } } else { - System.out.println("Sending: Invalid credentials (user not found or error)"); ctx.response().setStatusCode(401).end("Invalid credentials"); } }); diff --git a/src/main/java/su/xserver/iikocon/UserService.java b/src/main/java/su/xserver/iikocon/UserService.java index 425a4f9..a179713 100644 --- a/src/main/java/su/xserver/iikocon/UserService.java +++ b/src/main/java/su/xserver/iikocon/UserService.java @@ -73,11 +73,9 @@ public class UserService { .execute(Tuple.of(loginOrEmail, loginOrEmail)) .map(rows -> { if (rows.size() == 0) { - System.out.println("User not found: " + loginOrEmail); return null; } Row row = rows.iterator().next(); - System.out.println("User found, active=" + row.getBoolean("active")); return toJson(row); }); }