diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-02-09 21:02:03 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2019-02-09 21:16:10 +0900 |
commit | 7337876aac42552da6d926b38d7466cf2e51b7d8 (patch) | |
tree | 203013022016192c314ef2abab73fb44d6a0a051 /lib/csapi/login.cpp | |
parent | ee1d26586572d4d74105a0713d0237dbc2d183f0 (diff) | |
download | libquotient-7337876aac42552da6d926b38d7466cf2e51b7d8.tar.gz libquotient-7337876aac42552da6d926b38d7466cf2e51b7d8.zip |
csapi: support redirect-after-login (MSC1730)
Diffstat (limited to 'lib/csapi/login.cpp')
-rw-r--r-- | lib/csapi/login.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/csapi/login.cpp b/lib/csapi/login.cpp index ee33dac2..5e369b9a 100644 --- a/lib/csapi/login.cpp +++ b/lib/csapi/login.cpp @@ -67,6 +67,7 @@ class LoginJob::Private QString accessToken; QString homeServer; QString deviceId; + Omittable<DiscoveryInformation> wellKnown; }; static const auto LoginJobName = QStringLiteral("LoginJob"); @@ -111,6 +112,11 @@ const QString& LoginJob::deviceId() const return d->deviceId; } +const Omittable<DiscoveryInformation>& LoginJob::wellKnown() const +{ + return d->wellKnown; +} + BaseJob::Status LoginJob::parseJson(const QJsonDocument& data) { auto json = data.object(); @@ -118,6 +124,7 @@ BaseJob::Status LoginJob::parseJson(const QJsonDocument& data) fromJson(json.value("access_token"_ls), d->accessToken); fromJson(json.value("home_server"_ls), d->homeServer); fromJson(json.value("device_id"_ls), d->deviceId); + fromJson(json.value("well_known"_ls), d->wellKnown); return Success; } |