20#ifndef CREDENTIALS_MANAGER_H
21#define CREDENTIALS_MANAGER_H
45 virtual void store(
const QString &server,
const QString &user,
const QString &token) {
56 virtual void get(
const QString &server,
const QString &user)
const {
67 virtual void remove(
const QString &server,
const QString &user) {
99 virtual bool isSecure()
const {
return false; }
102 void tokenRetrieved(
const QString &server,
const QString &user,
const QString &token)
const;
104 void usersListed(
const QString& server,
const QStringList &users)
const;
117 void store(
const QString &server,
const QString &user,
const QString &token)
override;
118 void get(
const QString &server,
const QString &user)
const override;
119 void remove(
const QString &server,
const QString &user)
override;
121 void listUsers(
const QString &server)
override;
125 QString urlToGroupName(
const QString &url)
const;
126 QSettings m_settings;
The CredentialsManager class stores credentials for users.
Definition credentialmanager.h:36
virtual void listServers() const
Gives the list of servers that have a user stored with a token.
Definition credentialmanager.h:76
void tokenRetrieved(const QString &server, const QString &user, const QString &token) const
void usersListed(const QString &server, const QStringList &users) const
virtual void get(const QString &server, const QString &user) const
Retrieves a stored token. Emits tokenRetrieved when the token is retrieved.
Definition credentialmanager.h:56
virtual void remove(const QString &server, const QString &user)
removes a token
Definition credentialmanager.h:67
virtual void store(const QString &server, const QString &user, const QString &token)
Stores a token.
Definition credentialmanager.h:45
virtual bool isSecure() const
Definition credentialmanager.h:99
CredentialsManager(QObject *parent=nullptr)
Definition credentialmanager.h:107
static CredentialsManager * newInstance(QObject *parent=nullptr)
Retrieves an implementation which can store this token.
Definition credentialmanager.cpp:22
virtual void listUsers(const QString &server)
List the users with a token on a server.
Definition credentialmanager.h:82
void serversListed(const QStringList &servers) const
Implementation of CredentialsManager that stores credentials in plain-text.
Definition credentialmanager.h:113
void get(const QString &server, const QString &user) const override
Retrieves a stored token. Emits tokenRetrieved when the token is retrieved.
Definition credentialmanager.cpp:50
void remove(const QString &server, const QString &user) override
removes a token
Definition credentialmanager.cpp:55
void listServers() const override
Gives the list of servers that have a user stored with a token.
Definition credentialmanager.cpp:67
void listUsers(const QString &server) override
List the users with a token on a server.
Definition credentialmanager.cpp:78
void store(const QString &server, const QString &user, const QString &token) override
Stores a token.
Definition credentialmanager.cpp:45
bool isSecure() const override
Definition credentialmanager.h:122
FallbackCredentialsManager(QObject *parent=nullptr)
Definition credentialmanager.cpp:29