diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-11-10 03:02:51 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-11-10 03:02:51 +0100 |
commit | 475d949a1e384d5de16bea5c90fee115460b4b8b (patch) | |
tree | 30501ffd2270e8ebda4ae468dba7dc7efa0942f7 /launcher/minecraft/auth/flows/Parsers.h | |
parent | 32f9c61c6e0e6cdf1eea2817a9b197f44b0415c5 (diff) | |
download | PrismLauncher-475d949a1e384d5de16bea5c90fee115460b4b8b.tar.gz PrismLauncher-475d949a1e384d5de16bea5c90fee115460b4b8b.tar.bz2 PrismLauncher-475d949a1e384d5de16bea5c90fee115460b4b8b.zip |
GH-4217 Add support for GamePass accounts and MC profile setup
- We now use the new endpoint for loggiong in via XBox tokens (/launcher/login)
- We now check game entitlements instead of only relying on MC profile presence
- Accounts can now be added even when they do not have a profile
- The launcher will guide you through selecting a Minecraft name if you don't have one yet
Diffstat (limited to 'launcher/minecraft/auth/flows/Parsers.h')
-rw-r--r-- | launcher/minecraft/auth/flows/Parsers.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/launcher/minecraft/auth/flows/Parsers.h b/launcher/minecraft/auth/flows/Parsers.h new file mode 100644 index 00000000..6c6b64ee --- /dev/null +++ b/launcher/minecraft/auth/flows/Parsers.h @@ -0,0 +1,19 @@ +#pragma once + +#include "minecraft/auth/AccountData.h" + +namespace Parsers +{ + bool getDateTime(QJsonValue value, QDateTime & out); + bool getString(QJsonValue value, QString & out); + bool getNumber(QJsonValue value, double & out); + bool getNumber(QJsonValue value, int64_t & out); + bool getBool(QJsonValue value, bool & out); + + bool parseXTokenResponse(QByteArray &data, Katabasis::Token &output, const char * name); + bool parseMojangResponse(QByteArray &data, Katabasis::Token &output); + + bool parseMinecraftProfile(QByteArray &data, MinecraftProfile &output); + bool parseMinecraftEntitlements(QByteArray &data, MinecraftEntitlement &output); + bool parseRolloutResponse(QByteArray &data, bool& result); +} |