diff --git a/oauth/kqoauth2request.cpp b/oauth/kqoauth2request.cpp index ef72428..e114a78 100644 --- a/oauth/kqoauth2request.cpp +++ b/oauth/kqoauth2request.cpp @@ -3,6 +3,7 @@ * * Author: Johan Paul (johan.paul@d-pointer.com) * http://www.d-pointer.com + * This file: Kyle Fowler * * KQOAuth is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by diff --git a/oauth/kqoauth2request.h b/oauth/kqoauth2request.h index 1bcc15e..2d0e8e5 100644 --- a/oauth/kqoauth2request.h +++ b/oauth/kqoauth2request.h @@ -3,6 +3,7 @@ * * Author: Johan Paul (johan.paul@d-pointer.com) * http://www.d-pointer.com + * This file: Kyle Fowler * * KQOAuth is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by diff --git a/oauth/kqoauthmanager.cpp b/oauth/kqoauthmanager.cpp index 943701b..38f8c73 100644 --- a/oauth/kqoauthmanager.cpp +++ b/oauth/kqoauthmanager.cpp @@ -311,6 +311,7 @@ void KQOAuthManager::executeAuthorizedRequest(KQOAuthRequest *request, int id) { QUrl urlWithParams = networkRequest.url(); urlWithParams.setQueryItems(urlParams); networkRequest.setUrl(urlWithParams); + qDebug() << networkRequest.url(); // Submit the request including the params. QNetworkReply *reply = d->networkManager->get(networkRequest); @@ -321,11 +322,10 @@ void KQOAuthManager::executeAuthorizedRequest(KQOAuthRequest *request, int id) { networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, request->contentType()); - /* qDebug() << networkRequest.rawHeaderList(); qDebug() << networkRequest.rawHeader("Authorization"); qDebug() << networkRequest.rawHeader("Content-Type"); - */ + QNetworkReply *reply; if (request->contentType() == "application/x-www-form-urlencoded") { reply = d->networkManager->post(networkRequest, request->requestBody()); diff --git a/oauth/kqoauthrequest.cpp b/oauth/kqoauthrequest.cpp index 3a9f85e..3cd5bdb 100644 --- a/oauth/kqoauthrequest.cpp +++ b/oauth/kqoauthrequest.cpp @@ -75,14 +75,12 @@ void KQOAuthRequestPrivate::prepareRequest() { break; case KQOAuthRequest::AuthorizedRequest: - if(requestOAuthMethod == KQOAuthRequest::OAUTH1) { - requestParameters.append( qMakePair( OAUTH_KEY_SIGNATURE_METHOD, oauthSignatureMethod )); - requestParameters.append( qMakePair( OAUTH_KEY_CONSUMER_KEY, oauthConsumerKey )); - requestParameters.append( qMakePair( OAUTH_KEY_VERSION, oauthVersion )); - requestParameters.append( qMakePair( OAUTH_KEY_TIMESTAMP, this->oauthTimestamp() )); - requestParameters.append( qMakePair( OAUTH_KEY_NONCE, this->oauthNonce() )); - requestParameters.append( qMakePair( OAUTH_KEY_TOKEN, oauthToken )); - } + requestParameters.append( qMakePair( OAUTH_KEY_SIGNATURE_METHOD, oauthSignatureMethod )); + requestParameters.append( qMakePair( OAUTH_KEY_CONSUMER_KEY, oauthConsumerKey )); + requestParameters.append( qMakePair( OAUTH_KEY_VERSION, oauthVersion )); + requestParameters.append( qMakePair( OAUTH_KEY_TIMESTAMP, this->oauthTimestamp() )); + requestParameters.append( qMakePair( OAUTH_KEY_NONCE, this->oauthNonce() )); + requestParameters.append( qMakePair( OAUTH_KEY_TOKEN, oauthToken )); break; default: @@ -208,10 +206,6 @@ QString KQOAuthRequestPrivate::oauthTimestamp() const { QString KQOAuthRequestPrivate::oauthNonce() const { // This is basically for unit tests only. In most cases we don't set the nonce beforehand. - if (!oauthNonce_.isEmpty()) { - return oauthNonce_; - } - return QString::number(qrand()); }