Review fixes

This commit is contained in:
Dale Glass 2022-01-02 20:00:45 +01:00
parent 6738624bff
commit 598032b734

View file

@ -569,7 +569,7 @@ void AccountManager::requestAccessToken(const QString& login, const QString& pas
postData.append("grant_type=password&");
postData.append("username=" + QUrl::toPercentEncoding(login) + "&");
postData.append("password=" + QUrl::toPercentEncoding(password) + "&");
postData.append(QString("scope=%1").arg(ACCOUNT_MANAGER_REQUESTED_SCOPE).toUtf8());
postData.append("scope=" + ACCOUNT_MANAGER_REQUESTED_SCOPE.toUtf8());
request.setUrl(grantURL);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
@ -590,9 +590,9 @@ void AccountManager::requestAccessTokenWithAuthCode(const QString& authCode, con
QByteArray postData;
postData.append("grant_type=authorization_code&");
postData.append(QString("client_id=%1&").arg(clientId).toUtf8());
postData.append(QString("client_secret=%1&").arg(clientSecret).toUtf8());
postData.append(QString("code=%1&").arg(authCode).toUtf8());
postData.append("client_id=" + clientId.toUtf8() + "&");
postData.append("client_secret=" + clientSecret.toUtf8() + "&");
postData.append("code=" + authCode.toUtf8() + "&");
postData.append(QByteArray("redirect_uri=") + QUrl::toPercentEncoding(redirectUri));
request.setUrl(grantURL);
@ -614,7 +614,7 @@ void AccountManager::requestAccessTokenWithSteam(QByteArray authSessionTicket) {
QByteArray postData;
postData.append("grant_type=password&");
postData.append(QByteArray("steam_auth_ticket=") + QUrl::toPercentEncoding(authSessionTicket) + "&");
postData.append(QString("scope=%1").arg(ACCOUNT_MANAGER_REQUESTED_SCOPE).toUtf8());
postData.append("scope=" + ACCOUNT_MANAGER_REQUESTED_SCOPE.toUtf8());
request.setUrl(grantURL);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
@ -635,9 +635,9 @@ void AccountManager::requestAccessTokenWithOculus(const QString& nonce, const QS
QByteArray postData;
postData.append("grant_type=password&");
postData.append(QString("oculus_nonce=%1&").arg(nonce).toUtf8());
postData.append(QString("oculus_id=%1&").arg(oculusID).toUtf8());
postData.append(QString("scope=%1").arg(ACCOUNT_MANAGER_REQUESTED_SCOPE).toUtf8());
postData.append("oculus_nonce=" + nonce.toUtf8() + "&");
postData.append("oculus_id=" + oculusID.toUtf8() + "&");
postData.append("scope=" + ACCOUNT_MANAGER_REQUESTED_SCOPE.toUtf8());
request.setUrl(grantURL);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
@ -667,7 +667,7 @@ void AccountManager::refreshAccessToken() {
QByteArray postData;
postData.append("grant_type=refresh_token&");
postData.append(QByteArray("refresh_token=") + QUrl::toPercentEncoding(_accountInfo.getAccessToken().refreshToken) + "&");
postData.append(QString("scope=%1").arg(ACCOUNT_MANAGER_REQUESTED_SCOPE).toUtf8());
postData.append("scope=" + ACCOUNT_MANAGER_REQUESTED_SCOPE.toUtf8());
request.setUrl(grantURL);
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");