Skip to content

Commit

Permalink
Update OtherLoginApi.java
Browse files Browse the repository at this point in the history
Fixed #303
  • Loading branch information
Coloryr committed Sep 12, 2024
1 parent ec574f8 commit 8f145e5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import okhttp3.*;

import java.io.IOException;
import java.util.Locale;
import java.util.Objects;
import java.util.UUID;

public class OtherLoginApi {
private static OkHttpClient client;
Expand Down Expand Up @@ -41,7 +43,7 @@ public void login(String userName,String password,Listener listener) throws IOEx
agent.setVersion(1.0);
authRequest.setAgent(agent);
authRequest.setRequestUser(true);
authRequest.setClientToken("fun");
authRequest.setClientToken(UUID.randomUUID().toString().toLowerCase(Locale.ROOT));
System.out.println(new Gson().toJson(authRequest));
RequestBody body = RequestBody.create(MediaType.parse("application/json"), new Gson().toJson(authRequest));
Request request = new Request.Builder()
Expand Down

0 comments on commit 8f145e5

Please sign in to comment.