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 QOAUTH2AUTHORIZATIONCODEFLOW_P_H |
16 | #define QOAUTH2AUTHORIZATIONCODEFLOW_P_H |
17 | |
18 | #ifndef QT_NO_HTTP |
19 | |
20 | #include <private/qabstractoauth2_p.h> |
21 | |
22 | #include <QtNetworkAuth/qoauthglobal.h> |
23 | #include <QtNetworkAuth/qoauth2authorizationcodeflow.h> |
24 | |
25 | #include <QtCore/qstring.h> |
26 | #include <QtCore/qdatetime.h> |
27 | |
28 | QT_BEGIN_NAMESPACE |
29 | |
30 | class QOAuth2AuthorizationCodeFlowPrivate : public QAbstractOAuth2Private |
31 | { |
32 | public: |
33 | Q_DECLARE_PUBLIC(QOAuth2AuthorizationCodeFlow) |
34 | |
35 | QOAuth2AuthorizationCodeFlowPrivate(const QUrl &authorizationUrl, |
36 | const QUrl &accessTokenUrl, |
37 | const QString &clientIdentifier, |
38 | QNetworkAccessManager *manager = nullptr); |
39 | |
40 | void _q_handleCallback(const QVariantMap &data); |
41 | void _q_accessTokenRequestFinished(const QVariantMap &values); |
42 | void _q_accessTokenRequestFailed(QAbstractOAuth::Error error, const QString &errorString = {}); |
43 | void _q_authenticate(QNetworkReply *reply, QAuthenticator *authenticator); |
44 | |
45 | QUrl accessTokenUrl; |
46 | QString tokenType; |
47 | QPointer<QNetworkReply> currentReply; |
48 | }; |
49 | |
50 | QT_END_NAMESPACE |
51 | |
52 | #endif // QT_NO_HTTP |
53 | |
54 | #endif // QOAUTH2AUTHORIZATIONCODEFLOW_P_H |
55 |