Commit 1f27e4cb authored by Jesus Fernandez's avatar Jesus Fernandez

Renamed TemporaryTokenReceived to TemporaryCredentialsReceived

parent e34fd1cf
......@@ -81,7 +81,7 @@ class OAUTH_EXPORT QAbstractOAuth : public QObject
public:
enum class Status {
NotAuthenticated,
TemporaryTokenReceived,
TemporaryCredentialsReceived,
Granted
};
......
......@@ -259,12 +259,12 @@ void QOAuth1Private::_q_tokensReceived(const QVariantMap &tokens)
case QAbstractOAuth::Status::NotAuthenticated:
if (tokens.value(Key::oauthCallbackConfirmed, true).toBool()) {
q->setTokenCredentials(credential);
setStatus(QAbstractOAuth::Status::TemporaryTokenReceived);
setStatus(QAbstractOAuth::Status::TemporaryCredentialsReceived);
}
else
Q_EMIT q->requestFailed(QAbstractOAuth::Error::OAuthCallbackNotVerified);
break;
case QAbstractOAuth::Status::TemporaryTokenReceived:
case QAbstractOAuth::Status::TemporaryCredentialsReceived:
q->setTokenCredentials(credential);
setStatus(QAbstractOAuth::Status::Granted);
break;
......@@ -678,7 +678,7 @@ void QOAuth1::grant()
connect(this, &QAbstractOAuth::statusChanged, [&](Status status) {
Q_D(QOAuth1);
if (status == Status::TemporaryTokenReceived) {
if (status == Status::TemporaryCredentialsReceived) {
if (!d->authorizationUrl.isEmpty()) {
QVariantMap parameters;
parameters.insert(Key::oauthToken, d->tokenCredentials.first);
......
......@@ -91,7 +91,7 @@ void QOAuth2AuthorizationCodeFlowPrivate::_q_handleCallback(const QVariantMap &d
return;
}
setStatus(QAbstractOAuth::Status::TemporaryTokenReceived);
setStatus(QAbstractOAuth::Status::TemporaryCredentialsReceived);
QVariantMap copy(data);
copy.remove(Key::code);
......
......@@ -369,7 +369,7 @@ void tst_QOAuth::grant()
QCOMPARE(spy.count(), 1);
}
connect(&o1, &QAbstractOAuth::statusChanged, [&](QAbstractOAuth::Status status) {
if (status == QAbstractOAuth::Status::TemporaryTokenReceived) {
if (status == QAbstractOAuth::Status::TemporaryCredentialsReceived) {
if (!requestToken.isEmpty())
QCOMPARE(requestToken, o1.tokenCredentials().first);
if (!requestTokenSecret.isEmpty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment