Fix MSA profile fetching
This reverts commit 290ccebc29
for
launcher/minecraft/auth/steps/MinecraftProfileStep.cpp.
Oops.
Signed-off-by: Lenny McLennington <lenny@sneed.church>
This commit is contained in:
parent
385eaea709
commit
94b01a5f5c
@ -7,21 +7,7 @@
|
|||||||
#include "net/NetUtils.h"
|
#include "net/NetUtils.h"
|
||||||
|
|
||||||
MinecraftProfileStep::MinecraftProfileStep(AccountData* data) : AuthStep(data) {
|
MinecraftProfileStep::MinecraftProfileStep(AccountData* data) : AuthStep(data) {
|
||||||
switch (m_data->type)
|
|
||||||
{
|
|
||||||
case AccountType::Mojang: {
|
|
||||||
baseUrl = "https://api.minecraftservices.com";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AccountType::AuthlibInjector: {
|
|
||||||
baseUrl = m_data->authlibInjectorApiLocation + "/minecraftservices";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// Silence warnings about unhandled enum values for values we know shouldn't be handled.
|
|
||||||
case AccountType::MSA:
|
|
||||||
case AccountType::Offline:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MinecraftProfileStep::~MinecraftProfileStep() noexcept = default;
|
MinecraftProfileStep::~MinecraftProfileStep() noexcept = default;
|
||||||
@ -32,7 +18,7 @@ QString MinecraftProfileStep::describe() {
|
|||||||
|
|
||||||
|
|
||||||
void MinecraftProfileStep::perform() {
|
void MinecraftProfileStep::perform() {
|
||||||
QUrl url = baseUrl + "/minecraft/profile";
|
auto url = QUrl("https://api.minecraftservices.com/minecraft/profile");
|
||||||
QNetworkRequest request = QNetworkRequest(url);
|
QNetworkRequest request = QNetworkRequest(url);
|
||||||
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||||
request.setRawHeader("Authorization", QString("Bearer %1").arg(m_data->yggdrasilToken.token).toUtf8());
|
request.setRawHeader("Authorization", QString("Bearer %1").arg(m_data->yggdrasilToken.token).toUtf8());
|
||||||
|
Loading…
Reference in New Issue
Block a user