28 std::optional<std::string>
type;
47immer::array<LoginFlow>
flows()
const;
89 if (! jo.is_object()) { jo = json::object(); }
99 if (jo.contains(
"type"s)) {
100 result.
type = jo.at(
"type"s);
142std::optional<std::string>
userId()
const;
176std::optional<std::string>
deviceId()
const;
183std::optional<DiscoveryInformation>
wellKnown()
const;
233 explicit LoginJob(std::string serverUrl
236 std::string type , std::optional<UserIdentifier> identifier = std::nullopt, std::optional<std::string> password = std::nullopt, std::optional<std::string> token = std::nullopt, std::optional<std::string> deviceId = std::nullopt, std::optional<std::string> initialDeviceDisplayName = std::nullopt, std::optional<bool> refreshToken = std::nullopt
243 static BaseJob::Body buildBody(std::string type, std::optional<UserIdentifier> identifier, std::optional<std::string> password, std::optional<std::string> token, std::optional<std::string> deviceId, std::optional<std::string> initialDeviceDisplayName, std::optional<bool> refreshToken);
256 using namespace Kazv;
immer::array< LoginFlow > flows() const
The homeserver's supported login types.
Definition login.cpp:80
bool success() const
Definition login.cpp:70
Get the supported login types to authenticate users.
Definition login.hpp:18
static BaseJob::Body buildBody()
Definition login.cpp:21
static BaseJob::Query buildQuery()
Definition login.cpp:13
GetLoginFlowsJob withData(JsonWrap j) &&
Definition login.cpp:53
static constexpr auto needsAuth()
Definition login.hpp:50
std::optional< int > expiresInMs() const
The lifetime of the access token, in milliseconds.
Definition login.cpp:210
std::optional< DiscoveryInformation > wellKnown() const
Optional client configuration provided by the server.
Definition login.cpp:243
bool success() const
Definition login.cpp:167
std::optional< std::string > userId() const
The fully-qualified Matrix ID for the account.
Definition login.cpp:177
std::optional< std::string > accessToken() const
An access token for the account.
Definition login.cpp:188
std::optional< std::string > homeServer() const
The server_name of the homeserver on which the account has been registered.
Definition login.cpp:221
std::optional< std::string > deviceId() const
ID of the logged-in device.
Definition login.cpp:232
std::optional< std::string > refreshToken() const
A refresh token for the account.
Definition login.cpp:199
Authenticates the user.
Definition login.hpp:124
LoginJob withData(JsonWrap j) &&
Definition login.cpp:150
static constexpr auto needsAuth()
Definition login.hpp:186
static BaseJob::Body buildBody(std::string type, std::optional< UserIdentifier > identifier, std::optional< std::string > password, std::optional< std::string > token, std::optional< std::string > deviceId, std::optional< std::string > initialDeviceDisplayName, std::optional< bool > refreshToken)
Definition login.cpp:100
static BaseJob::Query buildQuery()
Definition login.cpp:92
Definition basejob.hpp:94
Definition basejob.hpp:68
::Kazv::Body Body
Definition basejob.hpp:103
Definition jsonwrap.hpp:23
Definition location.hpp:10
Definition location.hpp:10
void addToJsonIfNeeded(json &j, std::string name, T &&arg)
Definition types.hpp:80
nlohmann::json json
Definition jsonwrap.hpp:20
Definition location.hpp:27
Gets the homeserver's supported login types to authenticate users.
Definition login.hpp:25
std::optional< std::string > type
The login type.
Definition login.hpp:28
Definition basejob.hpp:49
static void from_json(const json &jo, GetLoginFlowsJob::LoginFlow &result)
Definition login.hpp:96
static void to_json(json &jo, const GetLoginFlowsJob::LoginFlow &pod)
Definition login.hpp:87