mirror of
https://github.com/Miasmusa/Shadow.git
synced 2024-11-28 18:26:15 -05:00
fix mojang auth
This commit is contained in:
parent
7d71fc7cea
commit
5c58e9f0cc
1 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
package me.x150.authlib.login.mojang;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import java.io.BufferedReader;
|
||||
|
@ -43,7 +44,8 @@ public class MinecraftAuthenticator extends Authenticator<MinecraftToken> {
|
|||
request.add("agent", agent);
|
||||
request.addProperty("username", email);
|
||||
request.addProperty("password", password);
|
||||
request.addProperty("requestUser", false);
|
||||
request.addProperty("clientToken","");
|
||||
request.addProperty("requestUser", true);
|
||||
String requestBody = request.toString();
|
||||
httpURLConnection.setFixedLengthStreamingMode(requestBody.length());
|
||||
httpURLConnection.setRequestProperty("Content-Type", "application/json");
|
||||
|
|
Loading…
Reference in a new issue