aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/wellknown/identity_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/definitions/wellknown/identity_server.h')
-rw-r--r--lib/csapi/definitions/wellknown/identity_server.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/csapi/definitions/wellknown/identity_server.h b/lib/csapi/definitions/wellknown/identity_server.h
index d272e527..3bd07bd1 100644
--- a/lib/csapi/definitions/wellknown/identity_server.h
+++ b/lib/csapi/definitions/wellknown/identity_server.h
@@ -7,9 +7,6 @@
#include "converters.h"
namespace Quotient {
-
-// Data structures
-
/// Used by clients to discover identity server information.
struct IdentityServerInformation {
/// The base URL for the identity server for client-server connections.
@@ -18,8 +15,14 @@ struct IdentityServerInformation {
template <>
struct JsonObjectConverter<IdentityServerInformation> {
- static void dumpTo(QJsonObject& jo, const IdentityServerInformation& pod);
- static void fillFrom(const QJsonObject& jo, IdentityServerInformation& pod);
+ static void dumpTo(QJsonObject& jo, const IdentityServerInformation& pod)
+ {
+ addParam<>(jo, QStringLiteral("base_url"), pod.baseUrl);
+ }
+ static void fillFrom(const QJsonObject& jo, IdentityServerInformation& pod)
+ {
+ fromJson(jo.value("base_url"_ls), pod.baseUrl);
+ }
};
} // namespace Quotient