sneedmc/launcher/minecraft/auth/AuthSession.h

49 lines
1.0 KiB
C
Raw Normal View History

#pragma once
#include <QString>
#include <QMultiMap>
#include <memory>
2021-11-20 15:22:22 +00:00
#include "QObjectPtr.h"
class MinecraftAccount;
2021-11-20 15:22:22 +00:00
class QNetworkAccessManager;
struct AuthSession
{
2018-07-15 12:51:05 +00:00
bool MakeOffline(QString offline_playername);
QString serializeUserProperties();
enum Status
{
Undetermined,
RequiresOAuth,
2018-07-15 12:51:05 +00:00
RequiresPassword,
RequiresProfileSetup,
2018-07-15 12:51:05 +00:00
PlayableOffline,
PlayableOnline,
GoneOrMigrated
2018-07-15 12:51:05 +00:00
} 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;
};
typedef std::shared_ptr<AuthSession> AuthSessionPtr;