From 7230cd726b836f4da800c2c1290082a72d50dc97 Mon Sep 17 00:00:00 2001 From: Justin Slauson Date: Tue, 1 Mar 2016 19:58:04 -0700 Subject: [PATCH] validates with saved clienttoken --- MinecraftClient/Protocol/ProtocolHandler.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MinecraftClient/Protocol/ProtocolHandler.cs b/MinecraftClient/Protocol/ProtocolHandler.cs index 77abf9d5..ea095ae0 100644 --- a/MinecraftClient/Protocol/ProtocolHandler.cs +++ b/MinecraftClient/Protocol/ProtocolHandler.cs @@ -221,14 +221,15 @@ namespace MinecraftClient.Protocol /// Validates whether accessToken must be refreshed /// /// Will contain the cached access token previously returned by Minecraft.net + /// Will contain the cached client token created on login /// Returns the status of the token (Valid, Invalid, etc.) /// - public static ValidationResult GetTokenValidation(string accesstoken) + public static ValidationResult GetTokenValidation(string accesstoken, string clienttoken) { try { string result = ""; - string json_request = "{\"accessToken\": \"" + jsonEncode(accesstoken) + "\" }"; + string json_request = "{\"accessToken\": \"" + jsonEncode(accesstoken) + "\", \"clientToken\": \"" + jsonEncode(clienttoken) + "\" }"; int code = doHTTPSPost("authserver.mojang.com", "/validate", json_request, ref result); if (code == 204) {