From aabd18e08915d51f26ba2a441b98f7c9b547af0e Mon Sep 17 00:00:00 2001 From: Gravit Date: Fri, 5 Jun 2020 08:25:12 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=9E=D1=82=D0=BA=D1=80=D1=8B=D1=82?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B4=D0=BE=D1=81=D1=82=D1=83=D0=BF=D0=B0=20?= =?UTF-8?q?=D0=BA=20UUID=20=D0=B8=20URL=20=D1=81=D0=BA=D0=B8=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B8=20=D0=BF=D0=BB=D0=B0=D1=89=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socket/response/auth/AuthResponse.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java index 15667812..8cf4f0f2 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java @@ -98,12 +98,13 @@ public void execute(ChannelHandlerContext ctx, Client clientData) throws Excepti } result.session = clientData.session; } - if (authType != ConnectTypes.API && server.config.protectHandler.allowGetAccessToken(context)) { - UUID uuid = pair.handler.auth(aresult); - result.playerProfile = ProfileByUUIDResponse.getProfile(uuid, aresult.username, client, clientData.auth.textureProvider); - if (LogHelper.isDebugEnabled()) { - LogHelper.debug("Auth: %s accessToken %s uuid: %s", login, result.accessToken, uuid.toString()); - } + UUID uuid = pair.handler.auth(aresult); + result.playerProfile = ProfileByUUIDResponse.getProfile(uuid, aresult.username, client, clientData.auth.textureProvider); + if (authType == ConnectTypes.API || !server.config.protectHandler.allowGetAccessToken(context)) { + result.accessToken = null; + } + else if (LogHelper.isDebugEnabled()) { + LogHelper.debug("Auth: %s accessToken %s uuid: %s", login, result.accessToken, uuid.toString()); } clientData.type = authType; sendResult(result);