mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-30 08:20:27 +03:00
19491ff85f
- When the the users logs because of 401 or 403 errors, it checks if the server requested the remote wipe. If yes, locally deletes account and folders connected to the account and notify the server. If no, proceeds to ask the user to login again. - The app password is restored in the keychain. - WIP: The change also includes a test class for RemoteWipe. Signed-off-by: Camila San <hello@camila.codes>
28 lines
547 B
C++
28 lines
547 B
C++
#ifndef TESTHELPER_H
|
|
#define TESTHELPER_H
|
|
|
|
#include "folder.h"
|
|
#include "creds/httpcredentials.h"
|
|
|
|
using namespace OCC;
|
|
|
|
class HttpCredentialsTest : public HttpCredentials {
|
|
public:
|
|
HttpCredentialsTest(const QString& user, const QString& password)
|
|
: HttpCredentials(user, password)
|
|
{}
|
|
|
|
void askFromUser() Q_DECL_OVERRIDE {
|
|
|
|
}
|
|
};
|
|
|
|
static FolderDefinition folderDefinition(const QString &path) {
|
|
FolderDefinition d;
|
|
d.localPath = path;
|
|
d.targetPath = path;
|
|
d.alias = path;
|
|
return d;
|
|
}
|
|
|
|
#endif // TESTHELPER_H
|