mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-29 09:15:49 +00:00
3c46d8a412
This makes the account system much more modular and makes it treat errors as something recoverable, unless they come directly from the MSA refresh token becoming invalid.
46 lines
894 B
C++
46 lines
894 B
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QList>
|
|
#include <QVector>
|
|
#include <QSet>
|
|
#include <QNetworkReply>
|
|
#include <QImage>
|
|
|
|
#include <katabasis/DeviceFlow.h>
|
|
|
|
#include "minecraft/auth/Yggdrasil.h"
|
|
#include "minecraft/auth/AccountData.h"
|
|
#include "minecraft/auth/AccountTask.h"
|
|
#include "minecraft/auth/AuthStep.h"
|
|
|
|
class AuthFlow : public AccountTask
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit AuthFlow(AccountData * data, QObject *parent = 0);
|
|
|
|
Katabasis::Validity validity() {
|
|
return m_data->validity_;
|
|
};
|
|
|
|
QString getStateMessage() const override;
|
|
|
|
void executeTask() override;
|
|
|
|
signals:
|
|
void activityChanged(Katabasis::Activity activity);
|
|
|
|
private slots:
|
|
void stepFinished(AccountTaskState resultingState, QString message);
|
|
|
|
protected:
|
|
void succeed();
|
|
void nextStep();
|
|
|
|
protected:
|
|
QList<AuthStep::Ptr> m_steps;
|
|
AuthStep::Ptr m_currentStep;
|
|
};
|