libQuotient
A Qt library for building matrix clients
logout.h
Go to the documentation of this file.
1 // THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
2 
3 #pragma once
4 
5 #include <Quotient/jobs/basejob.h>
6 
7 namespace Quotient {
8 
9 //! \brief Invalidates a user access token
10 //!
11 //! Invalidates an existing access token, so that it can no longer be used for
12 //! authorization. The device associated with the access token is also deleted.
13 //! [Device keys](/client-server-api/#device-keys) for the device are deleted alongside the device.
14 class QUOTIENT_API LogoutJob : public BaseJob {
15 public:
16  explicit LogoutJob();
17 
18  //! \brief Construct a URL without creating a full-fledged job object
19  //!
20  //! This function can be used when a URL for LogoutJob
21  //! is necessary but the job itself isn't.
22  static QUrl makeRequestUrl(const HomeserverData& hsData);
23 };
24 
25 //! \brief Invalidates all access tokens for a user
26 //!
27 //! Invalidates all access tokens for a user, so that they can no longer be used for
28 //! authorization. This includes the access token that made this request. All devices
29 //! for the user are also deleted. [Device keys](/client-server-api/#device-keys) for the device are
30 //! deleted alongside the device.
31 //!
32 //! This endpoint does not use the [User-Interactive Authentication
33 //! API](/client-server-api/#user-interactive-authentication-api) because User-Interactive
34 //! Authentication is designed to protect against attacks where the someone gets hold of a single
35 //! access token then takes over the account. This endpoint invalidates all access tokens for the
36 //! user, including the token used in the request, and therefore the attacker is unable to take over
37 //! the account in this way.
38 class QUOTIENT_API LogoutAllJob : public BaseJob {
39 public:
40  explicit LogoutAllJob();
41 
42  //! \brief Construct a URL without creating a full-fledged job object
43  //!
44  //! This function can be used when a URL for LogoutAllJob
45  //! is necessary but the job itself isn't.
46  static QUrl makeRequestUrl(const HomeserverData& hsData);
47 };
48 
49 } // namespace Quotient