mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-30 17:15:01 +01:00
debug oauth
This commit is contained in:
parent
1e75988ce0
commit
2795412454
@ -72,6 +72,10 @@ OAuth2Service::OAuth2Service(const QString& auth_url, const QString& token_url,
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OAuth2Service::~OAuth2Service() {
|
||||||
|
qDebugNN << LOGSEC_OAUTH << "Destroying OAuth2Service instance.";
|
||||||
|
}
|
||||||
|
|
||||||
QString OAuth2Service::bearer() {
|
QString OAuth2Service::bearer() {
|
||||||
if (!isFullyLoggedIn()) {
|
if (!isFullyLoggedIn()) {
|
||||||
qApp->showGuiMessage(tr("You have to login first"),
|
qApp->showGuiMessage(tr("You have to login first"),
|
||||||
|
@ -38,6 +38,7 @@ class OAuth2Service : public QObject {
|
|||||||
explicit OAuth2Service(const QString& auth_url, const QString& token_url,
|
explicit OAuth2Service(const QString& auth_url, const QString& token_url,
|
||||||
const QString& client_id, const QString& client_secret,
|
const QString& client_id, const QString& client_secret,
|
||||||
const QString& scope, QObject* parent = nullptr);
|
const QString& scope, QObject* parent = nullptr);
|
||||||
|
virtual ~OAuth2Service();
|
||||||
|
|
||||||
// Returns bearer HTTP header value.
|
// Returns bearer HTTP header value.
|
||||||
// NOTE: If on working thread, then call this only if isFullyLoggedIn()
|
// NOTE: If on working thread, then call this only if isFullyLoggedIn()
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
#include "services/inoreader/inoreaderserviceroot.h"
|
#include "services/inoreader/inoreaderserviceroot.h"
|
||||||
#include "services/inoreader/network/inoreadernetworkfactory.h"
|
#include "services/inoreader/network/inoreadernetworkfactory.h"
|
||||||
|
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
FormEditInoreaderAccount::FormEditInoreaderAccount(QWidget* parent)
|
FormEditInoreaderAccount::FormEditInoreaderAccount(QWidget* parent)
|
||||||
: FormAccountDetails(qApp->icons()->miscIcon(QSL("inoreader")), parent), m_details(new InoreaderAccountDetails(this)) {
|
: FormAccountDetails(qApp->icons()->miscIcon(QSL("inoreader")), parent), m_details(new InoreaderAccountDetails(this)) {
|
||||||
insertCustomTab(m_details, tr("Server setup"), 0);
|
insertCustomTab(m_details, tr("Server setup"), 0);
|
||||||
@ -31,6 +33,8 @@ void FormEditInoreaderAccount::apply() {
|
|||||||
account<InoreaderServiceRoot>()->network()->oauth()->setTokensExpireIn(m_details->m_oauth->tokensExpireIn());
|
account<InoreaderServiceRoot>()->network()->oauth()->setTokensExpireIn(m_details->m_oauth->tokensExpireIn());
|
||||||
m_details->m_oauth->logout(true);
|
m_details->m_oauth->logout(true);
|
||||||
m_details->m_oauth->deleteLater();
|
m_details->m_oauth->deleteLater();
|
||||||
|
|
||||||
|
QThread::currentThread()->msleep(300);
|
||||||
}
|
}
|
||||||
|
|
||||||
account<InoreaderServiceRoot>()->network()->oauth()->setClientId(m_details->m_ui.m_txtAppId->lineEdit()->text());
|
account<InoreaderServiceRoot>()->network()->oauth()->setClientId(m_details->m_ui.m_txtAppId->lineEdit()->text());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user