PrismLauncher/launcher/minecraft/auth/AuthSession.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1019 B
C
Raw Normal View History

#pragma once
#include <QMultiMap>
#include <QString>
#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 {
bool MakeOffline(QString offline_playername);
void MakeDemo();
2018-07-15 13:51:05 +01:00
QString serializeUserProperties();
2018-07-15 13:51:05 +01:00
enum Status {
Undetermined,
RequiresOAuth,
RequiresPassword,
RequiresProfileSetup,
PlayableOffline,
PlayableOnline,
GoneOrMigrated
} status = Undetermined;
2018-07-15 13:51:05 +01:00
// 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>;