Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2578138
openid_token.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
openid_token.hpp
View Options
/******************************************************************************
* THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
*/
#pragma once
#include
"types.hpp"
namespace
Kazv
{
struct
OpenidToken
{
/// An access token the consumer may use to verify the identity of
/// the person who generated the token. This is given to the federation
/// API ``GET /openid/userinfo`` to verify the user's identity.
std
::
string
accessToken
;
/// The string ``Bearer``.
std
::
string
tokenType
;
/// The homeserver domain the consumer should use when attempting to
/// verify the user's identity.
std
::
string
matrixServerName
;
/// The number of seconds before this token expires and a new one must
/// be generated.
int
expiresIn
;
};
}
namespace
nlohmann
{
using
namespace
Kazv
;
template
<>
struct
adl_serializer
<
OpenidToken
>
{
static
void
to_json
(
json
&
jo
,
const
OpenidToken
&
pod
)
{
if
(
!
jo
.
is_object
())
{
jo
=
json
::
object
();
}
jo
[
"access_token"
s
]
=
pod
.
accessToken
;
jo
[
"token_type"
s
]
=
pod
.
tokenType
;
jo
[
"matrix_server_name"
s
]
=
pod
.
matrixServerName
;
jo
[
"expires_in"
s
]
=
pod
.
expiresIn
;
}
static
void
from_json
(
const
json
&
jo
,
OpenidToken
&
result
)
{
if
(
jo
.
contains
(
"access_token"
s
))
{
result
.
accessToken
=
jo
.
at
(
"access_token"
s
);
}
if
(
jo
.
contains
(
"token_type"
s
))
{
result
.
tokenType
=
jo
.
at
(
"token_type"
s
);
}
if
(
jo
.
contains
(
"matrix_server_name"
s
))
{
result
.
matrixServerName
=
jo
.
at
(
"matrix_server_name"
s
);
}
if
(
jo
.
contains
(
"expires_in"
s
))
{
result
.
expiresIn
=
jo
.
at
(
"expires_in"
s
);
}
}
};
}
namespace
Kazv
{
}
// namespace Kazv
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Tue, Jun 24, 9:27 PM (1 d, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
235023
Default Alt Text
openid_token.hpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment