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

Method perform

launcher/minecraft/auth/steps/MSAStep.cpp:84–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void MSAStep::perform() {
85 switch(m_action) {
86 case Refresh: {
87 if (m_data->msaClientID != m_clientId) {
88 emit hideVerificationUriAndCode();
89 emit finished(AccountTaskState::STATE_DISABLED, tr("Microsoft user authentication failed - client identification has changed."));
90 }
91 m_oauth2->refresh();
92 return;
93 }
94 case Login: {
95 QVariantMap extraOpts;
96 extraOpts["prompt"] = "select_account";
97 m_oauth2->setExtraRequestParams(extraOpts);
98
99 *m_data = AccountData();
100 m_data->msaClientID = m_clientId;
101 m_oauth2->login();
102 return;
103 }
104 }
105}
106
107void MSAStep::onOAuthActivityChanged(Katabasis::Activity activity) {
108 switch(activity) {

Callers 1

nextStepMethod · 0.45

Calls 4

AccountDataClass · 0.85
setExtraRequestParamsMethod · 0.80
refreshMethod · 0.45
loginMethod · 0.45

Tested by

no test coverage detected