1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of the Network Access API. This header file may change from
10// version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef QOAUTH1SIGNATURE_P_H
16#define QOAUTH1SIGNATURE_P_H
17
18#include <QtNetworkAuth/qoauth1signature.h>
19
20#include <QtCore/qurl.h>
21#include <QtCore/qstring.h>
22#include <QtCore/qvariant.h>
23#include <QtCore/qshareddata.h>
24#include <QtCore/private/qglobal_p.h>
25
26QT_BEGIN_NAMESPACE
27
28class QOAuth1SignaturePrivate : public QSharedData
29{
30public:
31 QOAuth1SignaturePrivate() = default;
32 QOAuth1SignaturePrivate(const QUrl &url, QOAuth1Signature::HttpRequestMethod method,
33 const QMultiMap<QString, QVariant> &parameters,
34 const QString &clientSharedKey = QString(),
35 const QString &tokenSecret = QString());
36
37 QByteArray signatureBaseString() const;
38 QByteArray secret() const;
39 static QByteArray parameterString(const QMultiMap<QString, QVariant> &parameters);
40 static QByteArray encodeHeaders(const QMultiMap<QString, QVariant> &headers);
41
42
43 QOAuth1Signature::HttpRequestMethod method = QOAuth1Signature::HttpRequestMethod::Post;
44 QByteArray customVerb;
45 QUrl url;
46 QString clientSharedKey;
47 QString tokenSecret;
48 QMultiMap<QString, QVariant> parameters;
49
50 static QOAuth1SignaturePrivate shared_null;
51};
52
53QT_END_NAMESPACE
54
55#endif // QOAUTH1SIGNATURE_P_H
56

source code of qtnetworkauth/src/oauth/qoauth1signature_p.h