MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / perform

Method perform

launcher/minecraft/auth/steps/EntitlementsStep.cpp:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18void EntitlementsStep::perform() {
19 auto uuid = QUuid::createUuid();
20 m_entitlementsRequestId = uuid.toString().remove('{').remove('}');
21 auto url = "https://api.minecraftservices.com/entitlements/license?requestId=" + m_entitlementsRequestId;
22 QNetworkRequest request = QNetworkRequest(url);
23 request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
24 request.setRawHeader("Accept", "application/json");
25 request.setRawHeader("Authorization", QString("Bearer %1").arg(m_data->yggdrasilToken.token).toUtf8());
26 AuthRequest *requestor = new AuthRequest(this);
27 connect(requestor, &AuthRequest::finished, this, &EntitlementsStep::onRequestDone);
28 requestor->get(request);
29 qDebug() << "Getting entitlements...";
30}
31
32void EntitlementsStep::rehydrate() {
33 // NOOP, for now. We only save bools and there's nothing to check.

Callers

nothing calls this directly

Calls 4

QStringClass · 0.85
removeMethod · 0.45
toStringMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected