| 1 | /****************************************************************************** |
|---|---|
| 2 | * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN |
| 3 | */ |
| 4 | |
| 5 | #include "login_token.h" |
| 6 | |
| 7 | using namespace Quotient; |
| 8 | |
| 9 | GenerateLoginTokenJob::GenerateLoginTokenJob( |
| 10 | const Omittable<AuthenticationData>& auth) |
| 11 | : BaseJob(HttpVerb::Post, QStringLiteral("GenerateLoginTokenJob"), |
| 12 | makePath(parts: "/_matrix/client/v1", parts: "/login/get_token")) |
| 13 | { |
| 14 | QJsonObject _dataJson; |
| 15 | addParam<IfNotEmpty>(container&: _dataJson, QStringLiteral("auth"), value: auth); |
| 16 | setRequestData({ _dataJson }); |
| 17 | addExpectedKey(key: "login_token"); |
| 18 | addExpectedKey(key: "expires_in_ms"); |
| 19 | } |
| 20 |