28 std::optional<std::string>
type;
47 immer::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);
134 bool success()
const;
142 std::optional<std::string> userId()
const;
147 std::optional<std::string> accessToken()
const;
153 std::optional<std::string> refreshToken()
const;
162 std::optional<int> expiresInMs()
const;
171 std::optional<std::string> homeServer()
const;
176 std::optional<std::string> deviceId()
const;
183 std::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
JobResponse(Response r)
Definition: login.cpp:67
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
GetLoginFlowsJob(std::string serverUrl)
Get the supported login types to authenticate users.
Definition: login.cpp:33
Definition: login.hpp:130
Authenticates the user.
Definition: login.hpp:124
static constexpr auto needsAuth()
Definition: login.hpp:186
Definition: basejob.hpp:91
Definition: basejob.hpp:77
::Kazv::Body Body
Definition: basejob.hpp:100
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:50
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