2021-12-04 00:18:05 +00:00
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include "QObjectPtr.h"
|
|
|
|
#include "minecraft/auth/AuthStep.h"
|
|
|
|
|
|
|
|
class XboxAuthorizationStep : public AuthStep {
|
|
|
|
Q_OBJECT
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
public:
|
|
|
|
explicit XboxAuthorizationStep(AccountData* data, Katabasis::Token* token, QString relyingParty, QString authorizationKind);
|
2021-12-04 00:18:05 +00:00
|
|
|
virtual ~XboxAuthorizationStep() noexcept;
|
|
|
|
|
|
|
|
void perform() override;
|
|
|
|
void rehydrate() override;
|
|
|
|
|
|
|
|
QString describe() override;
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
private:
|
|
|
|
bool processSTSError(QNetworkReply::NetworkError error, QByteArray data, QList<QNetworkReply::RawHeaderPair> headers);
|
2021-12-04 00:18:05 +00:00
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
private slots:
|
2021-12-04 00:18:05 +00:00
|
|
|
void onRequestDone(QNetworkReply::NetworkError, QByteArray, QList<QNetworkReply::RawHeaderPair>);
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
private:
|
|
|
|
Katabasis::Token* m_token;
|
2021-12-04 00:18:05 +00:00
|
|
|
QString m_relyingParty;
|
|
|
|
QString m_authorizationKind;
|
|
|
|
};
|