-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added possibility to logout the session
- Loading branch information
Showing
7 changed files
with
79 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/sk/tomsik68/mclauncher/impl/login/yggdrasil/YDLogoutRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package sk.tomsik68.mclauncher.impl.login.yggdrasil; | ||
|
||
import java.util.UUID; | ||
|
||
import net.minidev.json.JSONObject; | ||
import sk.tomsik68.mclauncher.api.json.IJSONSerializable; | ||
import sk.tomsik68.mclauncher.api.login.ISession; | ||
|
||
public class YDLogoutRequest implements IJSONSerializable { | ||
private final ISession session; | ||
private final UUID clientToken; | ||
|
||
public YDLogoutRequest(ISession session, UUID clientToken) { | ||
this.session = session; | ||
this.clientToken = clientToken; | ||
} | ||
|
||
@Override | ||
public JSONObject toJSON() { | ||
JSONObject jsonObj = new JSONObject(); | ||
jsonObj.put("accessToken", session.getSessionID()); | ||
jsonObj.put("clientToken", clientToken.toString()); | ||
return jsonObj; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters