Authlib injector, local auth server and ely by accounts support (#31)

* Add injector

* Add uuid generation for profile

* Add auth server emulator

* Start auth server on random port and bypass it to injector

* Run injector only when account type is dummy

* Clean authlib injector

* Add ely by authentication

* Remove old comments

* Add response status text to auth server

* Fix json value access

as done by @maximmasterr
This commit is contained in:
Max
2021-06-10 17:00:54 +03:00
committed by GitHub
parent 4db5965f89
commit 6df1be94dd
21 changed files with 424 additions and 33 deletions

View File

@@ -25,8 +25,6 @@
#include <Env.h>
#include <BuildConfig.h>
#include <QDebug>
YggdrasilTask::YggdrasilTask(MojangAccount *account, QObject *parent)
@@ -42,8 +40,9 @@ void YggdrasilTask::executeTask()
// Get the content of the request we're going to send to the server.
QJsonDocument doc(getRequestContent());
QUrl reqUrl(BuildConfig.AUTH_BASE + getEndpoint());
QNetworkRequest netRequest(reqUrl);
QUrl reqUrl(m_account->authEndpoint() + getEndpoint());
qDebug() << m_account->authEndpoint() + getEndpoint();
QNetworkRequest netRequest(reqUrl);
netRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
QByteArray requestData = doc.toJson();