diff options
author | Petr Mrázek <peterix@gmail.com> | 2021-11-28 18:42:01 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2021-11-28 18:42:01 +0100 |
commit | 285188ea532d0e4d1b2b798f1ab13e35202dca0d (patch) | |
tree | 60881ae834cb96eee61ab78e9845b58c8c6066db /launcher/minecraft/auth/MinecraftAccount.h | |
parent | 0e31f77468a8bf391ef2b31124f7882b7d907881 (diff) | |
download | PrismLauncher-285188ea532d0e4d1b2b798f1ab13e35202dca0d.tar.gz PrismLauncher-285188ea532d0e4d1b2b798f1ab13e35202dca0d.tar.bz2 PrismLauncher-285188ea532d0e4d1b2b798f1ab13e35202dca0d.zip |
GH-4071 handle network errors when logging in with MSA as 'soft'
This makes the tokens not expire when such errors happen.
Only applies to MSA, not the XBox and Mojang steps afterwards.
Further testing and improvements are still needed.
Diffstat (limited to 'launcher/minecraft/auth/MinecraftAccount.h')
-rw-r--r-- | launcher/minecraft/auth/MinecraftAccount.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/launcher/minecraft/auth/MinecraftAccount.h b/launcher/minecraft/auth/MinecraftAccount.h index 928d3742..459ef903 100644 --- a/launcher/minecraft/auth/MinecraftAccount.h +++ b/launcher/minecraft/auth/MinecraftAccount.h @@ -72,7 +72,7 @@ public: /* construction */ explicit MinecraftAccount(const MinecraftAccount &other, QObject *parent) = delete; //! Default constructor - explicit MinecraftAccount(QObject *parent = 0) : QObject(parent) {}; + explicit MinecraftAccount(QObject *parent = 0); static MinecraftAccountPtr createFromUsername(const QString &username); @@ -97,6 +97,10 @@ public: /* manipulation */ shared_qobject_ptr<AccountTask> refresh(AuthSessionPtr session); public: /* queries */ + QString internalId() const { + return m_internalId; + } + QString accountDisplayString() const { return data.accountDisplayString(); } @@ -119,6 +123,8 @@ public: /* queries */ bool isActive() const; + bool isExpired() const; + bool canMigrate() const { return data.canMigrateToMSA; } @@ -168,6 +174,7 @@ signals: // TODO: better signalling for the various possible state changes - especially errors protected: /* variables */ + QString m_internalId; AccountData data; // current task we are executing here |