5 #include <Quotient/jobs/basejob.h>
32 explicit RefreshJob(
const QString& refreshToken);
37 QString accessToken()
const {
return loadFromJson<QString>(
"access_token"_L1); }
42 QString refreshToken()
const {
return loadFromJson<QString>(
"refresh_token"_L1); }
47 std::optional<
int> expiresInMs()
const
49 return loadFromJson<std::optional<
int>>(
"expires_in_ms"_L1);
54 QString accessToken{};
59 QString refreshToken{};
64 std::optional<
int> expiresInMs{};
68 template <std::derived_from<RefreshJob> JobT>
69 constexpr inline auto doCollectResponse<JobT> = [](JobT* j) -> RefreshJob::Response {
70 return { j->accessToken(), j->refreshToken(), j->expiresInMs() };