GH-3392 dirty initial MSA support that shares logic with Mojang flows

Both act as the first step of AuthContext.
This commit is contained in:
Petr Mrázek
2021-07-26 21:44:11 +02:00
parent fca2e9e44c
commit 3a53349e33
66 changed files with 2342 additions and 2477 deletions

View File

@ -4,13 +4,7 @@
#include <QMultiMap>
#include <memory>
class MojangAccount;
struct User
{
QString id;
QMultiMap<QString, QString> properties;
};
class MinecraftAccount;
struct AuthSession
{
@ -21,13 +15,12 @@ struct AuthSession
enum Status
{
Undetermined,
RequiresOAuth,
RequiresPassword,
PlayableOffline,
PlayableOnline
} status = Undetermined;
User u;
// client token
QString client_token;
// account user name
@ -46,7 +39,7 @@ struct AuthSession
bool auth_server_online = false;
// Did the user request online mode?
bool wants_online = true;
std::shared_ptr<MojangAccount> m_accountPtr;
std::shared_ptr<MinecraftAccount> m_accountPtr;
};
typedef std::shared_ptr<AuthSession> AuthSessionPtr;