feat(accounts): support msa-client-id value
This commit is contained in:
parent
12c8a04458
commit
be910374dc
@ -327,6 +327,10 @@ bool AccountData::resumeStateFromV3(QJsonObject data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(type == AccountType::MSA) {
|
if(type == AccountType::MSA) {
|
||||||
|
auto clientIDV = data.value("msa-client-id");
|
||||||
|
if (clientIDV.isString()) {
|
||||||
|
msaClientID = clientIDV.toString();
|
||||||
|
} // leave msaClientID empty if it doesn't exist or isn't a string
|
||||||
msaToken = tokenFromJSONV3(data, "msa");
|
msaToken = tokenFromJSONV3(data, "msa");
|
||||||
userToken = tokenFromJSONV3(data, "utoken");
|
userToken = tokenFromJSONV3(data, "utoken");
|
||||||
xboxApiToken = tokenFromJSONV3(data, "xrp-main");
|
xboxApiToken = tokenFromJSONV3(data, "xrp-main");
|
||||||
@ -360,6 +364,7 @@ QJsonObject AccountData::saveState() const {
|
|||||||
}
|
}
|
||||||
else if (type == AccountType::MSA) {
|
else if (type == AccountType::MSA) {
|
||||||
output["type"] = "MSA";
|
output["type"] = "MSA";
|
||||||
|
output["msa-client-id"] = msaClientID;
|
||||||
tokenToJSONV3(output, msaToken, "msa");
|
tokenToJSONV3(output, msaToken, "msa");
|
||||||
tokenToJSONV3(output, userToken, "utoken");
|
tokenToJSONV3(output, userToken, "utoken");
|
||||||
tokenToJSONV3(output, xboxApiToken, "xrp-main");
|
tokenToJSONV3(output, xboxApiToken, "xrp-main");
|
||||||
|
@ -81,6 +81,7 @@ struct AccountData {
|
|||||||
bool legacy = false;
|
bool legacy = false;
|
||||||
bool canMigrateToMSA = false;
|
bool canMigrateToMSA = false;
|
||||||
|
|
||||||
|
QString msaClientID;
|
||||||
Katabasis::Token msaToken;
|
Katabasis::Token msaToken;
|
||||||
Katabasis::Token userToken;
|
Katabasis::Token userToken;
|
||||||
Katabasis::Token xboxApiToken;
|
Katabasis::Token xboxApiToken;
|
||||||
|
Loading…
Reference in New Issue
Block a user