Auth token is stored in settings and deleted if a request is not authorized (with automatic re-login). Failed request need to be resend.
This commit is contained in:
@ -30,6 +30,11 @@ class ServerCommunicator : public QObject {
|
||||
signals:
|
||||
void urlChanged();
|
||||
|
||||
void loginSuccessful(const QByteArray responseData);
|
||||
void loginFailure(const QString errorString);
|
||||
|
||||
void notAuthorized(const QString path);
|
||||
|
||||
void itemsFetched(const QByteArray jsonDoc);
|
||||
void itemsFetchFailure(const QString errorString);
|
||||
|
||||
@ -48,6 +53,8 @@ class ServerCommunicator : public QObject {
|
||||
QString m_password;
|
||||
QString m_authToken;
|
||||
|
||||
bool validLoginCredentials();
|
||||
|
||||
void sendGetRequest(const QString& path);
|
||||
void onGetReplySuccessful(const QString& path, const QJsonDocument doc);
|
||||
void onGetReplyFailure(const QString& path, const QString errorString);
|
||||
|
||||
Reference in New Issue
Block a user