From bc21511eecf2adb38e6a45be307d6205fe4db5d0 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Mon, 10 Feb 2020 13:05:07 +0100 Subject: [PATCH] [OAuth] Fix naming --- src/gui/creds/httpcredentialsgui.cpp | 2 +- src/gui/wizard/owncloudoauthcredspage.cpp | 2 +- src/libsync/creds/httpcredentials.cpp | 2 +- src/libsync/creds/oauth.cpp | 4 ++-- src/libsync/creds/oauth.h | 4 ++-- test/testoauth.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gui/creds/httpcredentialsgui.cpp b/src/gui/creds/httpcredentialsgui.cpp index 208ffabb32..b6bc81bfcd 100644 --- a/src/gui/creds/httpcredentialsgui.cpp +++ b/src/gui/creds/httpcredentialsgui.cpp @@ -52,7 +52,7 @@ void HttpCredentialsGui::askFromUserAsync() this, &HttpCredentialsGui::asyncAuthResult); connect(_asyncAuth.data(), &OAuth::destroyed, this, &HttpCredentialsGui::authorisationLinkChanged); - _asyncAuth->startAuthentification(); + _asyncAuth->startAuthentication(); emit authorisationLinkChanged(); } else if (type == DetermineAuthTypeJob::Basic) { showDialog(); diff --git a/src/gui/wizard/owncloudoauthcredspage.cpp b/src/gui/wizard/owncloudoauthcredspage.cpp index c08a74c301..8929a04697 100644 --- a/src/gui/wizard/owncloudoauthcredspage.cpp +++ b/src/gui/wizard/owncloudoauthcredspage.cpp @@ -72,7 +72,7 @@ void OwncloudOAuthCredsPage::initializePage() ocWizard->account()->setCredentials(new HttpCredentialsGui); _asyncAuth.reset(new OAuth(ocWizard->account().data(), this)); connect(_asyncAuth.data(), &OAuth::result, this, &OwncloudOAuthCredsPage::asyncAuthResult, Qt::QueuedConnection); - _asyncAuth->startAuthentification(); + _asyncAuth->startAuthentication(); wizard()->hide(); } diff --git a/src/libsync/creds/httpcredentials.cpp b/src/libsync/creds/httpcredentials.cpp index 3c67aadbc3..5a754d2134 100644 --- a/src/libsync/creds/httpcredentials.cpp +++ b/src/libsync/creds/httpcredentials.cpp @@ -431,7 +431,7 @@ bool HttpCredentials::refreshAccessToken() _retryQueue.clear(); emit fetched(); }); - oauth->refreshAuthentification(_refreshToken); + oauth->refreshAuthentication(_refreshToken); _isRenewingOAuthToken = true; return true; } diff --git a/src/libsync/creds/oauth.cpp b/src/libsync/creds/oauth.cpp index 1047611db3..cb9fe4b7fa 100644 --- a/src/libsync/creds/oauth.cpp +++ b/src/libsync/creds/oauth.cpp @@ -60,7 +60,7 @@ const char *moreHeaders = nullptr) socket->setParent(nullptr); } -void OAuth::startAuthentification() +void OAuth::startAuthentication() { // Listen on the socket to get a port which will be used in the redirect_uri if (!_server.listen(QHostAddress::LocalHost)) { @@ -174,7 +174,7 @@ void OAuth::startAuthentification() }); } -void OAuth::refreshAuthentification(const QString &refreshToken) +void OAuth::refreshAuthentication(const QString &refreshToken) { connect(this, &OAuth::fetchWellKnownFinished, this, [this, refreshToken] { auto job = postTokenRequest({ { QStringLiteral("grant_type"), QStringLiteral("refresh_token") }, diff --git a/src/libsync/creds/oauth.h b/src/libsync/creds/oauth.h index 7bd49bc246..91360a9bcc 100644 --- a/src/libsync/creds/oauth.h +++ b/src/libsync/creds/oauth.h @@ -58,8 +58,8 @@ public: OAuth(Account *account, QObject *parent); ~OAuth(); - void startAuthentification(); - void refreshAuthentification(const QString &refreshToken); + void startAuthentication(); + void refreshAuthentication(const QString &refreshToken); void openBrowser(); QUrl authorisationLink() const; /** diff --git a/test/testoauth.cpp b/test/testoauth.cpp index fca317fd93..23ad7cf4f6 100644 --- a/test/testoauth.cpp +++ b/test/testoauth.cpp @@ -145,7 +145,7 @@ public: oauth.reset(new OAuth(account.data(), nullptr)); QObject::connect(oauth.data(), &OAuth::result, this, &OAuthTestCase::oauthResult); - oauth->startAuthentification(); + oauth->startAuthentication(); QTRY_VERIFY(done()); }