libQuotient
A Qt library for building matrix clients
Loading...
Searching...
No Matches
auth_data.h
Go to the documentation of this file.
1// THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
2
3#pragma once
4
5#include <Quotient/converters.h>
6
7namespace Quotient {
8//! Used by clients to submit authentication information to the interactive-authentication API
10 //! The authentication type that the client is attempting to complete.
11 //! May be omitted if `session` is given, and the client is reissuing a
12 //! request which it believes has been completed out-of-band (for example,
13 //! via the [fallback mechanism](#fallback)).
15
16 //! The value of the session key given by the homeserver.
18
19 //! Keys dependent on the login type
21};
22
23template <>
24struct JsonObjectConverter<AuthenticationData> {
25 static void dumpTo(QJsonObject& jo, const AuthenticationData& pod)
26 {
27 fillJson(jo, pod.authInfo);
28 addParam<IfNotEmpty>(jo, "type"_L1, pod.type);
29 addParam<IfNotEmpty>(jo, "session"_L1, pod.session);
30 }
31 static void fillFrom(QJsonObject jo, AuthenticationData& pod)
32 {
33 fillFromJson(jo.take("type"_L1), pod.type);
34 fillFromJson(jo.take("session"_L1), pod.session);
35 fromJson(jo, pod.authInfo);
36 }
37};
38
39} // namespace Quotient
#define QUOTIENT_API
Used by clients to submit authentication information to the interactive-authentication API.
Definition auth_data.h:9
QString session
The value of the session key given by the homeserver.
Definition auth_data.h:17
QVariantHash authInfo
Keys dependent on the login type.
Definition auth_data.h:20