pollymc/launcher/minecraft/auth/AuthSession.h
Petr Mrázek 3a53349e33 GH-3392 dirty initial MSA support that shares logic with Mojang flows
Both act as the first step of AuthContext.
2021-08-15 23:18:50 +02:00

46 lines
985 B
C++

#pragma once
#include <QString>
#include <QMultiMap>
#include <memory>
class MinecraftAccount;
struct AuthSession
{
bool MakeOffline(QString offline_playername);
QString serializeUserProperties();
enum Status
{
Undetermined,
RequiresOAuth,
RequiresPassword,
PlayableOffline,
PlayableOnline
} status = Undetermined;
// client token
QString client_token;
// account user name
QString username;
// combined session ID
QString session;
// volatile auth token
QString access_token;
// profile name
QString player_name;
// profile ID
QString uuid;
// 'legacy' or 'mojang', depending on account type
QString user_type;
// Did the auth server reply?
bool auth_server_online = false;
// Did the user request online mode?
bool wants_online = true;
std::shared_ptr<MinecraftAccount> m_accountPtr;
};
typedef std::shared_ptr<AuthSession> AuthSessionPtr;