libkazv
|
#include <registration.hpp>
Public Member Functions | |
JobResponse (Response r) | |
bool | success () const |
std::string | userId () const |
The fully-qualified Matrix user ID (MXID) that has been registered. More... | |
std::optional< std::string > | accessToken () const |
An access token for the account. More... | |
std::optional< std::string > | refreshToken () const |
A refresh token for the account. More... | |
std::optional< int > | expiresInMs () const |
The lifetime of the access token, in milliseconds. More... | |
std::optional< std::string > | homeServer () const |
The server_name of the homeserver on which the account has been registered. More... | |
std::optional< std::string > | deviceId () const |
ID of the registered device. More... | |
Public Member Functions inherited from Kazv::Response | |
std::string | errorCode () const |
std::string | errorMessage () const |
JsonWrap | jsonBody () const |
constexpr bool | success () const |
json | dataJson (const std::string &key) const |
std::string | dataStr (const std::string &key) const |
std::string | jobId () const |
Additional Inherited Members | |
Public Types inherited from Kazv::Response | |
using | StatusCode = int |
Public Attributes inherited from Kazv::Response | |
StatusCode | statusCode |
Body | body |
Header | header |
JsonWrap | extraData |
Kazv::Api::RegisterJob::JobResponse::JobResponse | ( | Response | r | ) |
std::optional< std::string > Kazv::Api::RegisterResponse::accessToken | ( | ) | const |
An access token for the account.
This access token can then be used to authorize other requests. Required if the inhibit_login
option is false.
std::optional< std::string > Kazv::Api::RegisterResponse::deviceId | ( | ) | const |
ID of the registered device.
Will be the same as the corresponding parameter in the request, if one was specified. Required if the inhibit_login
option is false.
std::optional< int > Kazv::Api::RegisterResponse::expiresInMs | ( | ) | const |
The lifetime of the access token, in milliseconds.
Once the access token has expired a new access token can be obtained by using the provided refresh token. If no refresh token is provided, the client will need to re-log in to obtain a new access token. If not given, the client can assume that the access token will not expire.
Omitted if the inhibit_login
option is true.
std::optional< std::string > Kazv::Api::RegisterResponse::homeServer | ( | ) | const |
The server_name of the homeserver on which the account has been registered.
Deprecated. Clients should extract the server_name from user_id
(by splitting at the first colon) if they require it. Note also that homeserver
is not spelt this way.
std::optional< std::string > Kazv::Api::RegisterResponse::refreshToken | ( | ) | const |
A refresh token for the account.
This token can be used to obtain a new access token when it expires by calling the /refresh
endpoint.
Omitted if the inhibit_login
option is true.
bool Kazv::Api::RegisterResponse::success | ( | ) | const |
std::string Kazv::Api::RegisterResponse::userId | ( | ) | const |
The fully-qualified Matrix user ID (MXID) that has been registered.
Any user ID returned by this API must conform to the grammar given in the Matrix specification.