-
Notifications
You must be signed in to change notification settings - Fork 17
New Login Information Saving
Tomas Jasek edited this page Jul 17, 2015
·
13 revisions
The new launcher allows users to save more profiles. As you may have suspected, it uses JSON to save your profiles. This file is in .minecraft/launcher_profiles.json. The file is very confusing, since it's saving more things in one. It combines preferences of minecraft launching process and login information, which should be separated in my opinion...
This is the entire file:
{
"profiles": {
"Tomsik68": {
"name": "Tomsik68",
"javaDir": "/usr/lib/jvm/java-8-openjdk/jre/bin/java",
"javaArgs": "-Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M",
"launcherVisibilityOnGameClose": "hide launcher and re-open when game closes"
},
"Forge": {
"name": "Forge",
"lastVersionId": "1.8-Forge11.14.3.1450"
}
},
"selectedProfile": "Tomsik68",
"clientToken": "client-token",
"authenticationDatabase": {
"UUID": {
"displayName": "Tomsik68",
"userProperties": [
{
"name": "twitch_access_token",
"value": "my_twitch_token"
}
],
"accessToken": "my_session_id",
"userid": "my_user_id",
"uuid": "UUID",
"username": "tomsik68@gmail.com"
}
},
"selectedUser": "UUID",
"launcherVersion": {
"name": "1.6.13",
"format": 17
}
}
Let's get straight to authentication database, because that's the only section which stores login information.
Let's start by JSON example:
"player-uuid": {
"username": "tomsik68@gmail.com",
"accessToken": "accessToken",
"userid": "user-id",
"uuid": "player-uuid",
"displayName": "Tomsik68"
}
I had to hide the real values, because exposing them is dangerous :)
Let's make a table!(yeah, markdown...). Value type for all these nodes is string, so I'm not putting it down...
Node name | Description |
---|---|
username | Username of mojang/minecraft account |
accessToken | Lastly used session ID |
userid | Usage unknown, probably mojang account ID |
uuid | UUID of player(minecraft-related) |
displayName | This is how you see the authentication profile in launcher |
-
Find your home - Where is the
.minecraft
folder?
- MinecraftLauncherBackend & GlobalAuthenticationSystem - Logging in, Updating, Running the game
- Login - Logging in with password or session ID
- Profile I/O - Saving/Loading login credentials
- LAN Server Discovery - Discovering servers which are running on LAN
- Loading saved servers - Loading servers from servers.dat