diff options
Diffstat (limited to 'logic/auth')
-rw-r--r-- | logic/auth/MojangAccount.cpp | 4 | ||||
-rw-r--r-- | logic/auth/MojangAccount.h | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/logic/auth/MojangAccount.cpp b/logic/auth/MojangAccount.cpp index 4875e5f7..4f3839bc 100644 --- a/logic/auth/MojangAccount.cpp +++ b/logic/auth/MojangAccount.cpp @@ -82,6 +82,10 @@ void MojangAccount::setAccessToken(const QString& accessToken) m_accessToken = accessToken; } +QString MojangAccount::sessionId() const +{ + return "token:" + m_accessToken + ":" + currentProfile()->id(); +} const QList<AccountProfile> MojangAccount::profiles() const { diff --git a/logic/auth/MojangAccount.h b/logic/auth/MojangAccount.h index e5684b77..062b8aa2 100644 --- a/logic/auth/MojangAccount.h +++ b/logic/auth/MojangAccount.h @@ -110,13 +110,18 @@ public: * If the user has not chosen to stay logged in, this will be an empty string. */ QString accessToken() const; - + /** * Changes this MojangAccount's access token to the given value. */ void setAccessToken(const QString& token); /** + * Get full session ID + */ + QString sessionId() const; + + /** * Returns a list of the available account profiles. */ const ProfileList profiles() const; |