Go to the documentation of this file.
12 struct OpenIdCredentials
41 if (! jo.is_object()) { jo = json::object(); }
44 jo[
"access_token"s] = pod.accessToken;
46 jo[
"token_type"s] = pod.tokenType;
48 jo[
"matrix_server_name"s] = pod.matrixServerName;
50 jo[
"expires_in"s] = pod.expiresIn;
56 if (jo.contains(
"access_token"s)) {
57 result.accessToken = jo.at(
"access_token"s);
59 if (jo.contains(
"token_type"s)) {
60 result.tokenType = jo.at(
"token_type"s);
62 if (jo.contains(
"matrix_server_name"s)) {
63 result.matrixServerName = jo.at(
"matrix_server_name"s);
65 if (jo.contains(
"expires_in"s)) {
66 result.expiresIn = jo.at(
"expires_in"s);
static void to_json(json &jo, const OpenIdCredentials &pod)
Definition: openid_token.hpp:39
Definition: location.hpp:26
Definition: location.hpp:10
std::string accessToken
An access token the consumer may use to verify the identity of the person who generated the token.
Definition: openid_token.hpp:22
std::string tokenType
The string Bearer.
Definition: openid_token.hpp:25
std::string matrixServerName
The homeserver domain the consumer should use when attempting to verify the user's identity.
Definition: openid_token.hpp:29
static void from_json(const json &jo, OpenIdCredentials &result)
Definition: openid_token.hpp:53
nlohmann::json json
Definition: jsonwrap.hpp:20
Definition: location.hpp:10
Definition: openid_token.hpp:14
int expiresIn
The number of seconds before this token expires and a new one must be generated.
Definition: openid_token.hpp:33