19 std::optional<std::string>
type;
37 if (! jo.is_object()) { jo = json::object(); }
48 if (jo.contains(
"type"s)) {
49 result.
type = jo.at(
"type"s);
51 if (jo.contains(
"session"s)) {
52 result.
session = jo.at(
"session"s);
Definition: location.hpp:10
Definition: location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition: types.hpp:80
void addPropertyMapToJson(json &j, MapT &&arg)
Definition: types.hpp:91
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:27
Used by clients to submit authentication information to the interactive-authentication API.
Definition: auth_data.hpp:13
std::optional< std::string > type
The authentication type that the client is attempting to complete.
Definition: auth_data.hpp:19
immer::map< std::string, JsonWrap > authInfo
Keys dependent on the login type.
Definition: auth_data.hpp:25
std::optional< std::string > session
The value of the session key given by the homeserver.
Definition: auth_data.hpp:22
static void to_json(json &jo, const AuthenticationData &pod)
Definition: auth_data.hpp:35
static void from_json(const json &jo, AuthenticationData &result)
Definition: auth_data.hpp:45