aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/auth_data.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-06-01 10:08:00 +0200
committerGitHub <noreply@github.com>2022-06-01 10:08:00 +0200
commit6c735f9f55b936e9de1497c2f5896f0a018d4227 (patch)
treefccc042d6af708ddf0d540ea1166e8ae68365ecb /lib/csapi/definitions/auth_data.h
parent49b0d191ab8917c61b28da3cfeaf1d28c143d5c8 (diff)
parentcd442611b19ec4a438d0847bf09b7bca99b494d3 (diff)
downloadlibquotient-6c735f9f55b936e9de1497c2f5896f0a018d4227.tar.gz
libquotient-6c735f9f55b936e9de1497c2f5896f0a018d4227.zip
#554: Fix update-api jobs
Diffstat (limited to 'lib/csapi/definitions/auth_data.h')
-rw-r--r--lib/csapi/definitions/auth_data.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/csapi/definitions/auth_data.h b/lib/csapi/definitions/auth_data.h
index e92596d0..a9972323 100644
--- a/lib/csapi/definitions/auth_data.h
+++ b/lib/csapi/definitions/auth_data.h
@@ -10,7 +10,10 @@ namespace Quotient {
/// Used by clients to submit authentication information to the
/// interactive-authentication API
struct AuthenticationData {
- /// The login type that the client is attempting to complete.
+ /// The authentication type that the client is attempting to complete.
+ /// May be omitted if `session` is given, and the client is reissuing a
+ /// request which it believes has been completed out-of-band (for example,
+ /// via the [fallback mechanism](#fallback)).
QString type;
/// The value of the session key given by the homeserver.
@@ -25,7 +28,7 @@ struct JsonObjectConverter<AuthenticationData> {
static void dumpTo(QJsonObject& jo, const AuthenticationData& pod)
{
fillJson(jo, pod.authInfo);
- addParam<>(jo, QStringLiteral("type"), pod.type);
+ addParam<IfNotEmpty>(jo, QStringLiteral("type"), pod.type);
addParam<IfNotEmpty>(jo, QStringLiteral("session"), pod.session);
}
static void fillFrom(QJsonObject jo, AuthenticationData& pod)