Skip to content

Commit

Permalink
Don't spit out the access token pls
Browse files Browse the repository at this point in the history
  • Loading branch information
The Judge committed Aug 19, 2024
1 parent 0017d42 commit 0b786d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/pojlib/account/Msa.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public MinecraftAccount performLogin() {

public String acquireAccessToken(boolean isRefresh, String authcode) throws IOException, JSONException {
URL url = new URL(Constants.OAUTH_TOKEN_URL);
Logger.getInstance().appendToLog("MicrosoftLogin | isRefresh=" + isRefresh + ", authCode= "+authcode);
// Logger.getInstance().appendToLog("MicrosoftLogin | isRefresh=" + isRefresh + ", authCode= "+authcode);

String formData = convertToFormData(
"client_id", "00000000402b5328",
Expand All @@ -104,7 +104,7 @@ public String acquireAccessToken(boolean isRefresh, String authcode) throws IOEx
"scope", "service::user.auth.xboxlive.com::MBI_SSL"
);

Logger.getInstance().appendToLog("MicroAuth | " + formData);
// Logger.getInstance().appendToLog("MicroAuth | " + formData);

HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
Expand Down Expand Up @@ -170,10 +170,10 @@ private String[] acquireXsts(String xblToken) throws IOException, JSONException
data.put("TokenType", "JWT");

String req = data.toString();
Logger.getInstance().appendToLog("MicrosoftLogin | " + req);
// Logger.getInstance().appendToLog("MicrosoftLogin | " + req);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
setCommonProperties(conn, req);
Logger.getInstance().appendToLog("MicrosoftLogin | " + conn.getRequestMethod());
// Logger.getInstance().appendToLog("MicrosoftLogin | " + conn.getRequestMethod());
conn.connect();

try(OutputStream wr = conn.getOutputStream()) {
Expand All @@ -195,7 +195,7 @@ private String[] acquireXsts(String xblToken) throws IOException, JSONException
Logger.getInstance().appendToLog(responseContents);
throw new MSAException(responseContents, null);
}
Logger.getInstance().appendToLog("Unknown error returned from Xbox Live\n" + responseContents);
// Logger.getInstance().appendToLog("Unknown error returned from Xbox Live\n" + responseContents);
throw new MSAException("Unknown error returned from Xbox Live", null);
} else{
throw getResponseThrowable(conn);
Expand Down

0 comments on commit 0b786d1

Please sign in to comment.