summaryrefslogtreecommitdiffstats
path: root/src/oauth/qoauth2authorizationcodeflow.cpp
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-06-16 22:22:18 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-06-19 09:29:36 +0000
commit1df057883cda44590ed2b21326c30f83def8f7e6 (patch)
tree7bea869fc39d080ed87c9a96e2b97c8359ffa73b /src/oauth/qoauth2authorizationcodeflow.cpp
parent2f42f06d73a4a2be2b94e01f37cac3316dcce5b2 (diff)
Fix no response_type error
Ensures the response type to be sent when using all constructors. The bug was introduced by a previous patch. Change-Id: I22990f57a2eeffb8090584fbdaf6bc321bb73de4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/oauth/qoauth2authorizationcodeflow.cpp')
-rw-r--r--src/oauth/qoauth2authorizationcodeflow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/oauth/qoauth2authorizationcodeflow.cpp b/src/oauth/qoauth2authorizationcodeflow.cpp
index c16d636..3580687 100644
--- a/src/oauth/qoauth2authorizationcodeflow.cpp
+++ b/src/oauth/qoauth2authorizationcodeflow.cpp
@@ -77,7 +77,9 @@ QOAuth2AuthorizationCodeFlowPrivate::QOAuth2AuthorizationCodeFlowPrivate(
QNetworkAccessManager *manager) :
QAbstractOAuth2Private(qMakePair(clientIdentifier, QString()), authorizationUrl, manager),
accessTokenUrl(accessTokenUrl)
-{}
+{
+ responseType = QStringLiteral("code");
+}
void QOAuth2AuthorizationCodeFlowPrivate::_q_handleCallback(const QVariantMap &data)
{
@@ -232,9 +234,7 @@ QOAuth2AuthorizationCodeFlow::QOAuth2AuthorizationCodeFlow(const QString &client
QAbstractOAuth2(*new QOAuth2AuthorizationCodeFlowPrivate(authenticateUrl, accessTokenUrl,
clientIdentifier, manager),
parent)
-{
- setResponseType(QStringLiteral("code"));
-}
+{}
/*!
Destroys the QOAuth2AuthorizationCodeFlow instance.