blob: 2ac170fab7702e8e44884f8fbfcc946d7b6e3745 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#pragma once
#include <QString>
#include <QMultiMap>
#include <memory>
struct User
{
QString id;
QMultiMap<QString, QString> 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;
};
typedef std::shared_ptr<AuthSession> AuthSessionPtr;
|