QOAuth1Signature Class
Implements OAuth 1 signature methods. More...
| Header: | #include <QOAuth1Signature> |
| qmake: | QT += networkauth |
| Since: | Qt 5.8 |
This class was introduced in Qt 5.8.
Public Types
| enum class | HttpRequestMethod { Head, Get, Put, Post, Delete, …, Unknown } |
Detailed Description
OAuth-authenticated requests can have two sets of credentials: those passed via the "oauth_consumer_key" parameter and those in the "oauth_token" parameter. In order for the server to verify the authenticity of the request and prevent unauthorized access, the client needs to prove that it is the rightful owner of the credentials. This is accomplished using the shared-secret (or RSA key) part of each set of credentials.
OAuth specifies three methods for the client to establish its rightful ownership of the credentials: "HMAC-SHA1", "RSA-SHA1", and "PLAINTEXT". Each generates a "signature" with which the request is "signed"; the first two use a digest of the data signed in generating this, though the last does not. The "RSA-SHA1" method is not supported here; it would use an RSA key rather than the shared-secret associated with the client credentials.
Member Type Documentation
enum class QOAuth1Signature::HttpRequestMethod
Indicates the HTTP request method.
| Constant | Value | Description |
|---|---|---|
QOAuth1Signature::HttpRequestMethod::Head | 1 | HEAD method. |
QOAuth1Signature::HttpRequestMethod::Get | 2 | GET method. |
QOAuth1Signature::HttpRequestMethod::Put | 3 | PUT method. |
QOAuth1Signature::HttpRequestMethod::Post | 4 | POST method. |
QOAuth1Signature::HttpRequestMethod::Delete | 5 | DELETE method. |
QOAuth1Signature::HttpRequestMethod::Custom | 6 | Identifies a custom method. |
QOAuth1Signature::HttpRequestMethod::Unknown | 0 | Method not set. |