| 325 | } |
| 326 | |
| 327 | QJsonObject AccountData::saveState() const |
| 328 | { |
| 329 | QJsonObject output; |
| 330 | if (type == AccountType::MSA) { |
| 331 | output["type"] = "MSA"; |
| 332 | output["msa-client-id"] = msaClientID; |
| 333 | tokenToJSONV3(output, msaToken, "msa"); |
| 334 | tokenToJSONV3(output, userToken, "utoken"); |
| 335 | tokenToJSONV3(output, xboxApiToken, "xrp-main"); |
| 336 | tokenToJSONV3(output, mojangservicesToken, "xrp-mc"); |
| 337 | } else if (type == AccountType::Offline) { |
| 338 | output["type"] = "Offline"; |
| 339 | } |
| 340 | |
| 341 | tokenToJSONV3(output, yggdrasilToken, "ygg"); |
| 342 | profileToJSONV3(output, minecraftProfile, "profile"); |
| 343 | entitlementToJSONV3(output, minecraftEntitlement); |
| 344 | return output; |
| 345 | } |
| 346 | |
| 347 | QString AccountData::accessToken() const |
| 348 | { |
no test coverage detected