diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-04-17 07:42:13 +0200 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-04-17 07:49:41 +0200 |
commit | 7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424 (patch) | |
tree | fa9e37d8874303bf56d5381b0844738bd516a79b /lib/csapi/registration.h | |
parent | 906699cc525e9e0be231a58cabffc31ad1f5193c (diff) | |
download | libquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.tar.gz libquotient-7036ed0dcb137cb5cbb6b426dd338c5e2e4c6424.zip |
Regenerate API files using new GTAD and refreshed templates
No functional changes.
Diffstat (limited to 'lib/csapi/registration.h')
-rw-r--r-- | lib/csapi/registration.h | 129 |
1 files changed, 67 insertions, 62 deletions
diff --git a/lib/csapi/registration.h b/lib/csapi/registration.h index 89aecb80..2619dd87 100644 --- a/lib/csapi/registration.h +++ b/lib/csapi/registration.h @@ -11,13 +11,12 @@ #include "jobs/basejob.h" -namespace Quotient -{ +namespace Quotient { // Operations -/// Register for an account on this homeserver. -/*! +/*! \brief Register for an account on this homeserver. + * * This API endpoint uses the `User-Interactive Authentication API`_. * * Register for an account on this homeserver. @@ -51,10 +50,10 @@ namespace Quotient * invalidate any access token previously associated with that device. See * `Relationship between access tokens and devices`_. */ -class RegisterJob : public BaseJob -{ +class RegisterJob : public BaseJob { public: - /*! Register for an account on this homeserver. + /*! \brief Register for an account on this homeserver. + * * \param kind * The kind of account to register. Defaults to `user`. * \param auth @@ -104,10 +103,12 @@ public: /// the `Matrix specification /// <https://matrix.org/docs/spec/appendices.html#user-identifiers>`_. const QString& userId() 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. const QString& accessToken() const; + /// The server_name of the homeserver on which the account has /// been registered. /// @@ -115,6 +116,7 @@ public: /// ``user_id`` (by splitting at the first colon) if they require /// it. Note also that ``homeserver`` is not spelt this way. const QString& homeServer() 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. @@ -128,20 +130,22 @@ private: QScopedPointer<Private> d; }; -/// Begins the validation process for an email to be used during registration. -/*! +/*! \brief Begins the validation process for an email to be used during + * registration. + * * Proxies the Identity Service API ``validate/email/requestToken``, but * first checks that the given email address is not already associated * with an account on this homeserver. See the Identity Service API for * further information. */ -class RequestTokenToRegisterEmailJob : public BaseJob -{ +class RequestTokenToRegisterEmailJob : public BaseJob { public: - /*! Begins the validation process for an email to be used during - * registration. \param clientSecret A unique string generated by the - * client, and used to identify the validation attempt. It must be a string - * consisting of the characters + /*! \brief Begins the validation process for an email to be used during + * registration. + * + * \param clientSecret + * A unique string generated by the client, and used to identify the + * validation attempt. It must be a string consisting of the characters * ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it * must not be empty. * \param email @@ -184,21 +188,22 @@ private: QScopedPointer<Private> d; }; -/// Requests a validation token be sent to the given phone number for the -/// purpose of registering an account -/*! +/*! \brief Requests a validation token be sent to the given phone number for the + * purpose of registering an account + * * Proxies the Identity Service API ``validate/msisdn/requestToken``, but * first checks that the given phone number is not already associated * with an account on this homeserver. See the Identity Service API for * further information. */ -class RequestTokenToRegisterMSISDNJob : public BaseJob -{ +class RequestTokenToRegisterMSISDNJob : public BaseJob { public: - /*! Requests a validation token be sent to the given phone number for the - * purpose of registering an account \param clientSecret A unique string - * generated by the client, and used to identify the validation attempt. It - * must be a string consisting of the characters + /*! \brief Requests a validation token be sent to the given phone number for + * the purpose of registering an account + * + * \param clientSecret + * A unique string generated by the client, and used to identify the + * validation attempt. It must be a string consisting of the characters * ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it * must not be empty. * \param country @@ -245,8 +250,8 @@ private: QScopedPointer<Private> d; }; -/// Changes a user's password. -/*! +/*! \brief Changes a user's password. + * * Changes the password for an account on this homeserver. * * This API endpoint uses the `User-Interactive Authentication API`_. @@ -257,10 +262,10 @@ private: * The homeserver may change the flows available depending on whether a * valid access token is provided. */ -class ChangePasswordJob : public BaseJob -{ +class ChangePasswordJob : public BaseJob { public: - /*! Changes a user's password. + /*! \brief Changes a user's password. + * * \param newPassword * The new password for the account. * \param auth @@ -271,9 +276,9 @@ public: const Omittable<AuthenticationData>& auth = none); }; -/// Requests a validation token be sent to the given email address for the -/// purpose of resetting a user's password -/*! +/*! \brief Requests a validation token be sent to the given email address for + * the purpose of resetting a user's password + * * Proxies the Identity Service API ``validate/email/requestToken``, but * first checks that the given email address **is** associated with an account * on this homeserver. This API should be used to request @@ -290,13 +295,14 @@ public: * .. _/register/email/requestToken: * #post-matrix-client-r0-register-email-requesttoken */ -class RequestTokenToResetPasswordEmailJob : public BaseJob -{ +class RequestTokenToResetPasswordEmailJob : public BaseJob { public: - /*! Requests a validation token be sent to the given email address for the - * purpose of resetting a user's password \param clientSecret A unique - * string generated by the client, and used to identify the validation - * attempt. It must be a string consisting of the characters + /*! \brief Requests a validation token be sent to the given email address + * for the purpose of resetting a user's password + * + * \param clientSecret + * A unique string generated by the client, and used to identify the + * validation attempt. It must be a string consisting of the characters * ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it * must not be empty. * \param email @@ -337,9 +343,9 @@ private: QScopedPointer<Private> d; }; -/// Requests a validation token be sent to the given phone number for the -/// purpose of resetting a user's password. -/*! +/*! \brief Requests a validation token be sent to the given phone number for the + * purpose of resetting a user's password. + * * Proxies the Identity Service API ``validate/msisdn/requestToken``, but * first checks that the given phone number **is** associated with an account * on this homeserver. This API should be used to request @@ -356,13 +362,14 @@ private: * .. _/register/msisdn/requestToken: * #post-matrix-client-r0-register-email-requesttoken */ -class RequestTokenToResetPasswordMSISDNJob : public BaseJob -{ +class RequestTokenToResetPasswordMSISDNJob : public BaseJob { public: - /*! Requests a validation token be sent to the given phone number for the - * purpose of resetting a user's password. \param clientSecret A unique - * string generated by the client, and used to identify the validation - * attempt. It must be a string consisting of the characters + /*! \brief Requests a validation token be sent to the given phone number for + * the purpose of resetting a user's password. + * + * \param clientSecret + * A unique string generated by the client, and used to identify the + * validation attempt. It must be a string consisting of the characters * ``[0-9a-zA-Z.=_-]``. Its length must not exceed 255 characters and it * must not be empty. * \param country @@ -407,8 +414,8 @@ private: QScopedPointer<Private> d; }; -/// Deactivate a user's account. -/*! +/*! \brief Deactivate a user's account. + * * Deactivate the user's account, removing all ability for the user to * login again. * @@ -420,10 +427,10 @@ private: * The homeserver may change the flows available depending on whether a * valid access token is provided. */ -class DeactivateAccountJob : public BaseJob -{ +class DeactivateAccountJob : public BaseJob { public: - /*! Deactivate a user's account. + /*! \brief Deactivate a user's account. + * * \param auth * Additional authentication information for the user-interactive * authentication API. @@ -432,8 +439,8 @@ public: const Omittable<AuthenticationData>& auth = none); }; -/// Checks to see if a username is available on the server. -/*! +/*! \brief Checks to see if a username is available on the server. + * * Checks to see if a username is available, and valid, for the server. * * The server should check to ensure that, at the time of the request, the @@ -447,23 +454,21 @@ public: * reserve the username. This can mean that the username becomes unavailable * between checking its availability and attempting to register it. */ -class CheckUsernameAvailabilityJob : public BaseJob -{ +class CheckUsernameAvailabilityJob : public BaseJob { public: - /*! Checks to see if a username is available on the server. + /*! \brief Checks to see if a username is available on the server. + * * \param username * The username to check the availability of. */ explicit CheckUsernameAvailabilityJob(const QString& username); - /*! Construct a URL without creating a full-fledged job object + /*! \brief Construct a URL without creating a full-fledged job object * - * This function can be used when a URL for - * CheckUsernameAvailabilityJob is necessary but the job - * itself isn't. + * This function can be used when a URL for CheckUsernameAvailabilityJob + * is necessary but the job itself isn't. */ static QUrl makeRequestUrl(QUrl baseUrl, const QString& username); - ~CheckUsernameAvailabilityJob() override; // Result properties |