2021-07-22 20:15:20 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QDateTime>
|
|
|
|
#include <QMap>
|
|
|
|
#include <QVariantMap>
|
|
|
|
|
|
|
|
namespace Katabasis {
|
|
|
|
enum class Activity {
|
|
|
|
Idle,
|
|
|
|
LoggingIn,
|
|
|
|
LoggingOut,
|
2021-11-28 18:42:01 +01:00
|
|
|
Refreshing,
|
|
|
|
FailedSoft, //!< soft failure. this generally means the user auth details haven't been invalidated
|
|
|
|
FailedHard, //!< hard failure. auth is invalid
|
|
|
|
FailedGone, //!< hard failure. auth is invalid, and the account no longer exists
|
|
|
|
Succeeded
|
2021-07-22 20:15:20 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class Validity {
|
|
|
|
None,
|
|
|
|
Assumed,
|
|
|
|
Certain
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Token {
|
|
|
|
QDateTime issueInstant;
|
|
|
|
QDateTime notAfter;
|
|
|
|
QString token;
|
|
|
|
QString refresh_token;
|
|
|
|
QVariantMap extra;
|
|
|
|
|
|
|
|
Validity validity = Validity::None;
|
|
|
|
bool persistent = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|