PrismLauncher/launcher/minecraft/auth/AuthSession.h
LocalSpook 5be80df1ee Replace typedef with using
Signed-off-by: LocalSpook <56512186+LocalSpook@users.noreply.github.com>
2023-10-24 01:36:27 -07:00

47 lines
1019 B
C++

#pragma once
#include <QMultiMap>
#include <QString>
#include <memory>
#include "QObjectPtr.h"
class MinecraftAccount;
class QNetworkAccessManager;
struct AuthSession {
bool MakeOffline(QString offline_playername);
void MakeDemo();
QString serializeUserProperties();
enum Status {
Undetermined,
RequiresOAuth,
RequiresPassword,
RequiresProfileSetup,
PlayableOffline,
PlayableOnline,
GoneOrMigrated
} status = Undetermined;
// 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;
// Is this a demo session?
bool demo = false;
};
using AuthSessionPtr = std::shared_ptr<AuthSession>;