2021-12-04 00:18:05 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#include "QObjectPtr.h"
|
|
|
|
#include "minecraft/auth/AuthStep.h"
|
|
|
|
|
|
|
|
#include <katabasis/DeviceFlow.h>
|
|
|
|
|
|
|
|
class MSAStep : public AuthStep {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
enum Action {
|
|
|
|
Refresh,
|
|
|
|
Login
|
|
|
|
};
|
|
|
|
public:
|
|
|
|
explicit MSAStep(AccountData *data, Action action);
|
|
|
|
virtual ~MSAStep() noexcept;
|
|
|
|
|
|
|
|
void perform() override;
|
|
|
|
void rehydrate() override;
|
|
|
|
|
|
|
|
QString describe() override;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void onOAuthActivityChanged(Katabasis::Activity activity);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Katabasis::DeviceFlow *m_oauth2 = nullptr;
|
|
|
|
Action m_action;
|
2022-02-18 11:27:34 +00:00
|
|
|
QString m_clientId;
|
2021-12-04 00:18:05 +00:00
|
|
|
};
|