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