diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/CachedAuthHandler.java b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/CachedAuthHandler.java index 82b598fd..6653c06b 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/CachedAuthHandler.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/auth/handler/CachedAuthHandler.java @@ -24,7 +24,7 @@ public static final class Entry { public Entry(UUID uuid, String username, String accessToken, String serverID) { this.uuid = Objects.requireNonNull(uuid, "uuid"); this.username = Objects.requireNonNull(username, "username"); - this.accessToken = accessToken == null ? null : SecurityHelper.verifyToken(accessToken); + this.accessToken = accessToken == null ? null : accessToken; this.serverID = serverID == null ? null : VerifyHelper.verifyServerID(serverID); } } diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/JoinServerResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/JoinServerResponse.java index 521a908e..afc2a2e1 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/JoinServerResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/JoinServerResponse.java @@ -22,7 +22,7 @@ public JoinServerResponse(LaunchServer server, long session, HInput input, HOutp @Override public void reply() throws IOException { String username = VerifyHelper.verifyUsername(input.readString(SerializeLimits.MAX_LOGIN)); - String accessToken = SecurityHelper.verifyToken(input.readASCII(-SecurityHelper.TOKEN_STRING_LENGTH)); + String accessToken = input.readASCII(-SecurityHelper.TOKEN_STRING_LENGTH); String serverID = VerifyHelper.verifyServerID(input.readASCII(SerializeLimits.MAX_SERVERID)); // With minus sign if (!clientData.isAuth || clientData.type != Client.Type.USER) { requestError("Access denied"); diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java index f684ec33..9ee932eb 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/ClientLauncher.java @@ -90,7 +90,7 @@ public Params(byte[] launcherDigest, Path assetDir, Path clientDir, PlayerProfil this.clientDir = clientDir; // Client params this.pp = pp; - this.accessToken = SecurityHelper.verifyToken(accessToken); + this.accessToken = accessToken; this.autoEnter = autoEnter; this.fullScreen = fullScreen; this.ram = ram; @@ -110,7 +110,7 @@ public Params(HInput input) throws Exception { pp = new PlayerProfile(input); byte[] encryptedAccessToken = input.readByteArray(SecurityHelper.CRYPTO_MAX_LENGTH); String accessTokenD = new String(SecurityHelper.decrypt(Launcher.getConfig().secretKeyClient.getBytes(), encryptedAccessToken)); - accessToken = SecurityHelper.verifyToken(accessTokenD); + accessToken = accessTokenD; autoEnter = input.readBoolean(); fullScreen = input.readBoolean(); ram = input.readVarInt(); diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/JoinServerRequest.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/JoinServerRequest.java index 0ff36115..e621331f 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/JoinServerRequest.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/auth/JoinServerRequest.java @@ -24,7 +24,7 @@ public final class JoinServerRequest extends Request { public JoinServerRequest(LauncherConfig config, String username, String accessToken, String serverID) { super(config); this.username = VerifyHelper.verifyUsername(username); - this.accessToken = SecurityHelper.verifyToken(accessToken); + this.accessToken = accessToken; this.serverID = VerifyHelper.verifyServerID(serverID); }