From 20b9f2b42a3b58b6081af271774fbcc34025dccb Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Sun, 25 Jul 2021 19:11:59 +0200 Subject: NOISSUE Flatten gui and logic libraries into MultiMC --- launcher/minecraft/auth/AuthSession.h | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 launcher/minecraft/auth/AuthSession.h (limited to 'launcher/minecraft/auth/AuthSession.h') diff --git a/launcher/minecraft/auth/AuthSession.h b/launcher/minecraft/auth/AuthSession.h new file mode 100644 index 00000000..29958597 --- /dev/null +++ b/launcher/minecraft/auth/AuthSession.h @@ -0,0 +1,52 @@ +#pragma once + +#include +#include +#include + +class MojangAccount; + +struct User +{ + QString id; + QMultiMap properties; +}; + +struct AuthSession +{ + bool MakeOffline(QString offline_playername); + + QString serializeUserProperties(); + + enum Status + { + Undetermined, + RequiresPassword, + PlayableOffline, + PlayableOnline + } status = Undetermined; + + User u; + + // 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 m_accountPtr; +}; + +typedef std::shared_ptr AuthSessionPtr; -- cgit