diff options
Diffstat (limited to 'lib/csapi/definitions/auth_data.h')
-rw-r--r-- | lib/csapi/definitions/auth_data.h | 7 |
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) |