refactor: add logging category for credentials
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
4d334b645d
commit
c8d8046412
13 changed files with 81 additions and 54 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "JsonResponse.h"
|
||||
|
||||
namespace {
|
||||
|
||||
// ref: https://tools.ietf.org/html/rfc8628#section-3.2
|
||||
// Exception: Google sign-in uses "verification_url" instead of "*_uri" - we'll accept both.
|
||||
bool hasMandatoryDeviceAuthParams(const QVariantMap& params)
|
||||
|
@ -58,6 +59,8 @@ QByteArray createQueryParameters(const QList<Katabasis::RequestParameter> ¶m
|
|||
|
||||
namespace Katabasis {
|
||||
|
||||
Q_LOGGING_CATEGORY(katabasisCredentials, "katabasis.credentials", QtWarningMsg)
|
||||
|
||||
DeviceFlow::DeviceFlow(Options & opts, Token & token, QObject *parent, QNetworkAccessManager *manager) : QObject(parent), token_(token) {
|
||||
manager_ = manager ? manager : new QNetworkAccessManager(this);
|
||||
qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
|
||||
|
@ -333,9 +336,7 @@ QString DeviceFlow::refreshToken() {
|
|||
}
|
||||
|
||||
void DeviceFlow::setRefreshToken(const QString &v) {
|
||||
#ifndef NDEBUG
|
||||
qDebug() << "DeviceFlow::setRefreshToken" << v << "...";
|
||||
#endif
|
||||
qCDebug(katabasisCredentials) << "new refresh token:" << v;
|
||||
token_.refresh_token = v;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue