debug oauth

This commit is contained in:
Martin Rotter 2021-02-23 07:24:59 +01:00
parent 5b81188cf3
commit 1e75988ce0
4 changed files with 10 additions and 9 deletions

View file

@ -41,7 +41,7 @@ void OAuthHttpHandler::setListenAddressPort(const QString& full_uri) {
listen_address = QHostAddress(url.host());
}
if (listen_address == m_listenAddress && url.port() == m_listenPort && m_httpServer.isListening()) {
if (listen_address == m_listenAddress && listen_port == m_listenPort && m_httpServer.isListening()) {
// NOTE: We do not need to change listener's settings or re-start it.
return;
}
@ -54,9 +54,9 @@ void OAuthHttpHandler::setListenAddressPort(const QString& full_uri) {
if (!m_httpServer.listen(listen_address, listen_port)) {
qCriticalNN << LOGSEC_OAUTH
<< "OAuth redirect handler FAILED TO START TO LISTEN on address"
<< QUOTE_W_SPACE(m_listenAddress.toString())
<< QUOTE_W_SPACE(listen_address.toString())
<< "and port"
<< QUOTE_W_SPACE_DOT(m_listenPort);
<< QUOTE_W_SPACE_DOT(listen_port);
}
else {
m_listenAddress = listen_address;

View file

@ -33,7 +33,7 @@ void FormEditFeedlyAccount::apply() {
account<FeedlyServiceRoot>()->network()->oauth()->setAccessToken(m_details->m_oauth->accessToken());
account<FeedlyServiceRoot>()->network()->oauth()->setRefreshToken(m_details->m_oauth->refreshToken());
account<FeedlyServiceRoot>()->network()->oauth()->setTokensExpireIn(m_details->m_oauth->tokensExpireIn());
m_details->m_oauth->logout();
m_details->m_oauth->logout(true);
m_details->m_oauth->deleteLater();
// Force live OAuth object to re-start it's redirection handler.
@ -63,7 +63,7 @@ void FormEditFeedlyAccount::setEditableAccount(ServiceRoot* editable_account) {
#if defined (FEEDLY_OFFICIAL_SUPPORT)
if (m_details->m_oauth != nullptr) {
// We will use live OAuth service for testing.
m_details->m_oauth->logout();
m_details->m_oauth->logout(true);
m_details->m_oauth->deleteLater();
}

View file

@ -28,7 +28,7 @@ void FormEditGmailAccount::apply() {
account<GmailServiceRoot>()->network()->oauth()->setRefreshToken(m_details->m_oauth->refreshToken());
account<GmailServiceRoot>()->network()->oauth()->setAccessToken(m_details->m_oauth->accessToken());
account<GmailServiceRoot>()->network()->oauth()->setTokensExpireIn(m_details->m_oauth->tokensExpireIn());
m_details->m_oauth->logout();
m_details->m_oauth->logout(true);
m_details->m_oauth->deleteLater();
}
@ -53,7 +53,7 @@ void FormEditGmailAccount::setEditableAccount(ServiceRoot* editable_account) {
if (m_details->m_oauth != nullptr) {
// We will use live OAuth service for testing.
m_details->m_oauth->logout();
m_details->m_oauth->logout(true);
m_details->m_oauth->deleteLater();
}

View file

@ -54,8 +54,9 @@ void FormEditInoreaderAccount::setEditableAccount(ServiceRoot* editable_account)
if (m_details->m_oauth != nullptr) {
// We will use live OAuth service for testing.
m_details->m_oauth->logout();
m_details->m_oauth->deleteLater();
m_details->m_oauth->logout(true);
delete m_details->m_oauth;
m_details->m_oauth = nullptr;
}
m_details->m_oauth = account<InoreaderServiceRoot>()->network()->oauth();