aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/logout.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-03 17:29:52 +0900
committerGitHub <noreply@github.com>2019-08-03 17:29:52 +0900
commit66e116b7b1e848e80577a0229c8995db0a54932e (patch)
tree763340439a0f4034e9c829d76cb1ffe9766b83c5 /lib/csapi/logout.h
parent5b236dfe895c7766002559570aa29c9033009228 (diff)
parentc05ade838f0fce81f2bbe80a3295618a8a26ff52 (diff)
downloadlibquotient-66e116b7b1e848e80577a0229c8995db0a54932e.tar.gz
libquotient-66e116b7b1e848e80577a0229c8995db0a54932e.zip
Merge pull request #295 from marcdeop/140_impose_coding_standard
140 impose coding standard
Diffstat (limited to 'lib/csapi/logout.h')
-rw-r--r--lib/csapi/logout.h93
1 files changed, 47 insertions, 46 deletions
diff --git a/lib/csapi/logout.h b/lib/csapi/logout.h
index 3ef3c656..c03af180 100644
--- a/lib/csapi/logout.h
+++ b/lib/csapi/logout.h
@@ -6,52 +6,53 @@
#include "jobs/basejob.h"
-
namespace QMatrixClient
{
- // Operations
-
- /// 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);
-
- };
-
- /// 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);
-
- };
+
+// Operations
+
+/// 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);
+};
+
+/// 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