mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 08:36:26 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi
This commit is contained in:
commit
bd0086892d
1 changed files with 11 additions and 1 deletions
|
@ -35,7 +35,7 @@ const QString ACCOUNTS_GROUP = "accounts";
|
||||||
|
|
||||||
AccountManager::AccountManager() :
|
AccountManager::AccountManager() :
|
||||||
_authURL(),
|
_authURL(),
|
||||||
_networkAccessManager(new QNetworkAccessManager(this)),
|
_networkAccessManager(NULL),
|
||||||
_pendingCallbackMap(),
|
_pendingCallbackMap(),
|
||||||
_accountInfo()
|
_accountInfo()
|
||||||
{
|
{
|
||||||
|
@ -109,6 +109,11 @@ void AccountManager::authenticatedRequest(const QString& path, QNetworkAccessMan
|
||||||
|
|
||||||
void AccountManager::invokedRequest(const QString& path, QNetworkAccessManager::Operation operation,
|
void AccountManager::invokedRequest(const QString& path, QNetworkAccessManager::Operation operation,
|
||||||
const JSONCallbackParameters& callbackParams, const QByteArray& dataByteArray) {
|
const JSONCallbackParameters& callbackParams, const QByteArray& dataByteArray) {
|
||||||
|
|
||||||
|
if (!_networkAccessManager) {
|
||||||
|
_networkAccessManager = new QNetworkAccessManager(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (hasValidAccessToken()) {
|
if (hasValidAccessToken()) {
|
||||||
QNetworkRequest authenticatedRequest;
|
QNetworkRequest authenticatedRequest;
|
||||||
|
|
||||||
|
@ -229,6 +234,11 @@ bool AccountManager::checkAndSignalForAccessToken() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AccountManager::requestAccessToken(const QString& login, const QString& password) {
|
void AccountManager::requestAccessToken(const QString& login, const QString& password) {
|
||||||
|
|
||||||
|
if (!_networkAccessManager) {
|
||||||
|
_networkAccessManager = new QNetworkAccessManager(this);
|
||||||
|
}
|
||||||
|
|
||||||
QNetworkRequest request;
|
QNetworkRequest request;
|
||||||
|
|
||||||
QUrl grantURL = _authURL;
|
QUrl grantURL = _authURL;
|
||||||
|
|
Loading…
Reference in a new issue