+10
-13
@@ -14,11 +14,11 @@ struct AuthResult
|
||||
bool twoFactorRequired = false;
|
||||
QString error;
|
||||
|
||||
QString playerName; // ${auth_player_name}
|
||||
QString uuid; // ${auth_uuid}, hex без дефисов
|
||||
QString accessToken; // ${auth_access_token}
|
||||
QString clientToken; // ${clientid}
|
||||
QString userType; // ${user_type}: legacy / msa / ELYBY
|
||||
QString playerName; // ${auth_player_name}
|
||||
QString uuid; // ${auth_uuid}, hex без дефисов
|
||||
QString accessToken; // ${auth_access_token}
|
||||
QString clientToken; // ${clientid}
|
||||
QString userType; // ${user_type}: legacy / msa / ELYBY
|
||||
};
|
||||
|
||||
// Yggdrasil-клиент Ely.by плюс офлайн-режим. Все сетевые методы асинхронные:
|
||||
@@ -56,19 +56,16 @@ public:
|
||||
|
||||
// Скачивает authlib-injector в targetDir, если его там ещё нет.
|
||||
// Колбэк получает путь к jar либо текст ошибки.
|
||||
void ensureAuthlibInjector(
|
||||
const QString &targetDir,
|
||||
std::function<void(const QString &path, const QString &error)> callback);
|
||||
void ensureAuthlibInjector(const QString &targetDir,
|
||||
std::function<void(const QString &path, const QString &error)> callback);
|
||||
|
||||
signals:
|
||||
void progress(const QString &message);
|
||||
|
||||
private:
|
||||
void postJson(
|
||||
const QString &endpoint,
|
||||
const QJsonObject &body,
|
||||
std::function<void(int status, const QJsonObject &response, const QString &transportError)>
|
||||
handler);
|
||||
void postJson(const QString &endpoint,
|
||||
const QJsonObject &body,
|
||||
std::function<void(int status, const QJsonObject &response, const QString &transportError)> handler);
|
||||
|
||||
void authenticate(const QString &login,
|
||||
const QString &password,
|
||||
|
||||
Reference in New Issue
Block a user