summaryrefslogtreecommitdiffstats
path: root/tests/auto/oauth1/tst_oauth1.cpp
diff options
context:
space:
mode:
authorPoren Chiang <ren.chiang@gmail.com>2018-08-01 05:04:49 +0800
committerPoren Chiang <ren.chiang@gmail.com>2018-09-14 06:38:04 +0000
commit51a0b723032640e3b3f99adf3e392ed7d8ceec33 (patch)
tree4807df5fd55054b16b3bee656be83dcdb74c1e33 /tests/auto/oauth1/tst_oauth1.cpp
parenta8765e4e37ce02c8de26e4675a4fa034266412bc (diff)
Fix grant process by passing oauth parameters to header
Currently, `parameters` passed to `QOAuth1Private::requestToken` are used as HTTP GET or POST parameters directly. This commit fixes the non-standard compliant behavior by inserting parameters with `oauth_` prefix to `headers`; this fix also allows parameter `oauth_callback` to be inserted only during `OAuth1::grant()` but not all token requests. Several approaches had been taken under consideration: * strip `const` from `parameters` function signature * make a copy of `const QVariantMap &parameters` * insert relevant headers and leave parameters intact * current: copy oauth-inrelevant parameters to another map Task-number: QTBUG-69709 Change-Id: I892f0e6b9a70c9e425fef976f6703ef065ee9163 Reviewed-by: Poren Chiang <ren.chiang@gmail.com> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Diffstat (limited to 'tests/auto/oauth1/tst_oauth1.cpp')
-rw-r--r--tests/auto/oauth1/tst_oauth1.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/oauth1/tst_oauth1.cpp b/tests/auto/oauth1/tst_oauth1.cpp
index 2385863..dbc793c 100644
--- a/tests/auto/oauth1/tst_oauth1.cpp
+++ b/tests/auto/oauth1/tst_oauth1.cpp
@@ -450,7 +450,6 @@ void tst_OAuth1::getToken()
});
QVERIFY(waitForFinish(reply) == Success);
QCOMPARE(tokenReceived, expectedToken);
- QCOMPARE(oauthHeaders["oauth_callback"], "oob");
QCOMPARE(oauthHeaders["oauth_consumer_key"], clientCredentials.first);
QCOMPARE(oauthHeaders["oauth_version"], "1.0");
QString expectedSignature;