aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/logout.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/logout.h')
-rw-r--r--lib/csapi/logout.h92
1 files changed, 46 insertions, 46 deletions
diff --git a/lib/csapi/logout.h b/lib/csapi/logout.h
index 3ef3c656..78f14e40 100644
--- a/lib/csapi/logout.h
+++ b/lib/csapi/logout.h
@@ -6,52 +6,52 @@
#include "jobs/basejob.h"
+namespace Quotient {
-namespace QMatrixClient
-{
- // Operations
-
+/*! \brief Invalidates a user access token
+ *
+ * Invalidates an existing access token, so that it can no longer be used for
+ * authorization. The device associated with the access token is also deleted.
+ * `Device keys <#device-keys>`_ for the device are deleted alongside the device.
+ */
+class LogoutJob : public BaseJob {
+public:
/// Invalidates a user access token
- ///
- /// Invalidates an existing access token, so that it can no longer be used for
- /// authorization.
- class LogoutJob : public BaseJob
- {
- public:
- explicit LogoutJob();
-
- /*! Construct a URL without creating a full-fledged job object
- *
- * This function can be used when a URL for
- * LogoutJob is necessary but the job
- * itself isn't.
- */
- static QUrl makeRequestUrl(QUrl baseUrl);
-
- };
-
+ explicit LogoutJob();
+
+ /*! \brief Construct a URL without creating a full-fledged job object
+ *
+ * This function can be used when a URL for LogoutJob
+ * is necessary but the job itself isn't.
+ */
+ static QUrl makeRequestUrl(QUrl baseUrl);
+};
+
+/*! \brief Invalidates all access tokens for a user
+ *
+ * Invalidates all access tokens for a user, so that they can no longer be used
+ * for authorization. This includes the access token that made this request. All
+ * devices for the user are also deleted. `Device keys <#device-keys>`_ for the
+ * device are deleted alongside the device.
+ *
+ * This endpoint does not use the `User-Interactive Authentication API`_ because
+ * User-Interactive Authentication is designed to protect against attacks where
+ * the someone gets hold of a single access token then takes over the account.
+ * This endpoint invalidates all access tokens for the user, including the token
+ * used in the request, and therefore the attacker is unable to take over the
+ * account in this way.
+ */
+class LogoutAllJob : public BaseJob {
+public:
/// Invalidates all access tokens for a user
- ///
- /// Invalidates all access tokens for a user, so that they can no longer be used for
- /// authorization. This includes the access token that made this request.
- ///
- /// This endpoint does not require UI authorization because UI authorization is
- /// designed to protect against attacks where the someone gets hold of a single access
- /// token then takes over the account. This endpoint invalidates all access tokens for
- /// the user, including the token used in the request, and therefore the attacker is
- /// unable to take over the account in this way.
- class LogoutAllJob : public BaseJob
- {
- public:
- explicit LogoutAllJob();
-
- /*! Construct a URL without creating a full-fledged job object
- *
- * This function can be used when a URL for
- * LogoutAllJob is necessary but the job
- * itself isn't.
- */
- static QUrl makeRequestUrl(QUrl baseUrl);
-
- };
-} // namespace QMatrixClient
+ explicit LogoutAllJob();
+
+ /*! \brief Construct a URL without creating a full-fledged job object
+ *
+ * This function can be used when a URL for LogoutAllJob
+ * is necessary but the job itself isn't.
+ */
+ static QUrl makeRequestUrl(QUrl baseUrl);
+};
+
+} // namespace Quotient