From d967c88e5b3a0f6c6e7b2f319978771f7df4d874 Mon Sep 17 00:00:00 2001 From: delvh Date: Fri, 7 Feb 2020 23:37:33 +0100 Subject: [PATCH] Implemented method to check for the validity of logins Warning: will only work once f/advanced_login of envoy-common will be merged into develop --- .../processors/LoginCredentialProcessor.java | 68 +++++++++++++++---- 1 file changed, 53 insertions(+), 15 deletions(-) diff --git a/src/main/java/envoy/server/processors/LoginCredentialProcessor.java b/src/main/java/envoy/server/processors/LoginCredentialProcessor.java index 4a7f2c8..9020937 100644 --- a/src/main/java/envoy/server/processors/LoginCredentialProcessor.java +++ b/src/main/java/envoy/server/processors/LoginCredentialProcessor.java @@ -3,14 +3,18 @@ package envoy.server.processors; import java.io.IOException; import java.util.Arrays; import java.util.Date; +import java.util.InputMismatchException; import java.util.List; import java.util.stream.Collectors; +import javax.persistence.NoResultException; + import envoy.data.Contacts; import envoy.data.LoginCredentials; import envoy.data.Message.MessageStatus; import envoy.data.User; import envoy.data.User.UserStatus; +import envoy.event.HandshakeRejectionEvent; import envoy.server.ConnectionManager; import envoy.server.ObjectProcessor; import envoy.server.data.Message; @@ -40,7 +44,7 @@ public class LoginCredentialProcessor implements ObjectProcessor