debug oauth
This commit is contained in:
parent
5b81188cf3
commit
1e75988ce0
4 changed files with 10 additions and 9 deletions
|
|
@ -41,7 +41,7 @@ void OAuthHttpHandler::setListenAddressPort(const QString& full_uri) {
|
||||||
listen_address = QHostAddress(url.host());
|
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.
|
// NOTE: We do not need to change listener's settings or re-start it.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -54,9 +54,9 @@ void OAuthHttpHandler::setListenAddressPort(const QString& full_uri) {
|
||||||
if (!m_httpServer.listen(listen_address, listen_port)) {
|
if (!m_httpServer.listen(listen_address, listen_port)) {
|
||||||
qCriticalNN << LOGSEC_OAUTH
|
qCriticalNN << LOGSEC_OAUTH
|
||||||
<< "OAuth redirect handler FAILED TO START TO LISTEN on address"
|
<< "OAuth redirect handler FAILED TO START TO LISTEN on address"
|
||||||
<< QUOTE_W_SPACE(m_listenAddress.toString())
|
<< QUOTE_W_SPACE(listen_address.toString())
|
||||||
<< "and port"
|
<< "and port"
|
||||||
<< QUOTE_W_SPACE_DOT(m_listenPort);
|
<< QUOTE_W_SPACE_DOT(listen_port);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_listenAddress = listen_address;
|
m_listenAddress = listen_address;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ void FormEditFeedlyAccount::apply() {
|
||||||
account<FeedlyServiceRoot>()->network()->oauth()->setAccessToken(m_details->m_oauth->accessToken());
|
account<FeedlyServiceRoot>()->network()->oauth()->setAccessToken(m_details->m_oauth->accessToken());
|
||||||
account<FeedlyServiceRoot>()->network()->oauth()->setRefreshToken(m_details->m_oauth->refreshToken());
|
account<FeedlyServiceRoot>()->network()->oauth()->setRefreshToken(m_details->m_oauth->refreshToken());
|
||||||
account<FeedlyServiceRoot>()->network()->oauth()->setTokensExpireIn(m_details->m_oauth->tokensExpireIn());
|
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();
|
m_details->m_oauth->deleteLater();
|
||||||
|
|
||||||
// Force live OAuth object to re-start it's redirection handler.
|
// 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 defined (FEEDLY_OFFICIAL_SUPPORT)
|
||||||
if (m_details->m_oauth != nullptr) {
|
if (m_details->m_oauth != nullptr) {
|
||||||
// We will use live OAuth service for testing.
|
// We will use live OAuth service for testing.
|
||||||
m_details->m_oauth->logout();
|
m_details->m_oauth->logout(true);
|
||||||
m_details->m_oauth->deleteLater();
|
m_details->m_oauth->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ void FormEditGmailAccount::apply() {
|
||||||
account<GmailServiceRoot>()->network()->oauth()->setRefreshToken(m_details->m_oauth->refreshToken());
|
account<GmailServiceRoot>()->network()->oauth()->setRefreshToken(m_details->m_oauth->refreshToken());
|
||||||
account<GmailServiceRoot>()->network()->oauth()->setAccessToken(m_details->m_oauth->accessToken());
|
account<GmailServiceRoot>()->network()->oauth()->setAccessToken(m_details->m_oauth->accessToken());
|
||||||
account<GmailServiceRoot>()->network()->oauth()->setTokensExpireIn(m_details->m_oauth->tokensExpireIn());
|
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();
|
m_details->m_oauth->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ void FormEditGmailAccount::setEditableAccount(ServiceRoot* editable_account) {
|
||||||
|
|
||||||
if (m_details->m_oauth != nullptr) {
|
if (m_details->m_oauth != nullptr) {
|
||||||
// We will use live OAuth service for testing.
|
// We will use live OAuth service for testing.
|
||||||
m_details->m_oauth->logout();
|
m_details->m_oauth->logout(true);
|
||||||
m_details->m_oauth->deleteLater();
|
m_details->m_oauth->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,9 @@ void FormEditInoreaderAccount::setEditableAccount(ServiceRoot* editable_account)
|
||||||
|
|
||||||
if (m_details->m_oauth != nullptr) {
|
if (m_details->m_oauth != nullptr) {
|
||||||
// We will use live OAuth service for testing.
|
// We will use live OAuth service for testing.
|
||||||
m_details->m_oauth->logout();
|
m_details->m_oauth->logout(true);
|
||||||
m_details->m_oauth->deleteLater();
|
delete m_details->m_oauth;
|
||||||
|
m_details->m_oauth = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_details->m_oauth = account<InoreaderServiceRoot>()->network()->oauth();
|
m_details->m_oauth = account<InoreaderServiceRoot>()->network()->oauth();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue