-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaccesstokenrequest.h
40 lines (32 loc) · 941 Bytes
/
accesstokenrequest.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Author: Zadock Maloba
* E-mail: zadockmaloba@outlook.com
* Twitter: zadock_254
* copyright: Zadock Maloba, 2022
*/
#ifndef ACCESSTOKENREQUEST_H
#define ACCESSTOKENREQUEST_H
#include <QObject>
#include <QNetworkRequest>
#include <QJsonDocument>
#include <QJsonObject>
#include "networkhandler.h"
namespace DarajaCpp{
class AccessTokenRequest : public QObject
{
Q_OBJECT
public:
AccessTokenRequest(QString consumerKey, QString consumerSecret);
QNetworkRequest *renderRequest(NetworkHandler* netH);
const QString &consumerSecret() const;
void setConsumerSecret(const QString &newConsumerSecret);
const QString &consumerKey() const;
void setConsumerKey(const QString &newConsumerKey);
const QNetworkRequest &httpRequest() const;
private:
QNetworkRequest m_httpRequest;
QString m_consumerKey, m_consumerSecret, m_accessTokenString;
QUrl m_authUrl;
};
}
#endif // ACCESSTOKENREQUEST_H