From 8509fd37c7d4b13577d4a7f6a029dff92fedaf47 Mon Sep 17 00:00:00 2001 From: sasha0552 Date: Wed, 10 Apr 2019 03:28:57 +0600 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/handler/RequestAuthHandler.java | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/RequestAuthHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/RequestAuthHandler.java index 903211f7..627e28d1 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/RequestAuthHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/RequestAuthHandler.java @@ -29,24 +29,6 @@ protected Entry fetchEntry(String username) throws IOException { throw new UnsupportedOperationException("Произошол троллинг..."); } - @Override - protected boolean updateAuth(UUID uuid, String username, String accessToken) throws IOException { - boolean isUUIDupdated = updUUID(uuid, username).equals("OK"); - boolean isAccessTokenUpdated = updAccessToken(accessToken, username).equals("OK"); - if (isUUIDupdated == true && isAccessTokenUpdated == true) { - return true; - } else { - return false; - } - } - - @Override - protected boolean updateServerID(UUID uuid, String serverID) throws IOException { - return updServerID(uuid, serverID).equals("OK"); - } - - - /* @Override @@ -64,6 +46,20 @@ public String uuidToUsername(UUID uuid) throws IOException { */ + @Override + protected boolean updateAuth(UUID uuid, String username, String accessToken) throws IOException { + boolean isUUIDupdated = updUUID(uuid, username).equals("OK"); + boolean isAccessTokenUpdated = updAccessToken(accessToken, username).equals("OK"); + if (isUUIDupdated == true && isAccessTokenUpdated == true) { + return true; + } + return false; + } + + @Override + protected boolean updateServerID(UUID uuid, String serverID) throws IOException { + return updServerID(uuid, serverID).equals("OK"); + } protected String updAccessToken(final String accessToken, final String username) throws IOException { final String type = "SetAccessToken"; @@ -114,7 +110,5 @@ protected String updUUID(final UUID uuid, final String username) throws IOExcept } @Override - public void close() { - // Ничего не делать - } + public void close() {} } \ No newline at end of file