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.

ConstantValueDescription
QOAuth1Signature::HttpRequestMethod::Head1HEAD method.
QOAuth1Signature::HttpRequestMethod::Get2GET method.
QOAuth1Signature::HttpRequestMethod::Put3PUT method.
QOAuth1Signature::HttpRequestMethod::Post4POST method.
QOAuth1Signature::HttpRequestMethod::Delete5DELETE method.
QOAuth1Signature::HttpRequestMethod::Custom6Identifies a custom method.
QOAuth1Signature::HttpRequestMethod::Unknown0Method not set.