summaryrefslogtreecommitdiffstats
path: root/framework/src/keyring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/keyring.cpp')
-rw-r--r--framework/src/keyring.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/framework/src/keyring.cpp b/framework/src/keyring.cpp
index 759d0c4c..e3fdb1cb 100644
--- a/framework/src/keyring.cpp
+++ b/framework/src/keyring.cpp
@@ -23,20 +23,31 @@
23 23
24using namespace Kube; 24using namespace Kube;
25 25
26Keyring::Keyring(const QByteArray &accountId, QObject *parent) 26Keyring::Keyring()
27 : QObject()
28{
29
30}
31
32bool Keyring::isUnlocked(const QByteArray &accountId)
33{
34 return false;
35}
36
37AccountKeyring::AccountKeyring(const QByteArray &accountId, QObject *parent)
27 : QObject(parent), 38 : QObject(parent),
28 mAccountIdentifier(accountId) 39 mAccountIdentifier(accountId)
29{ 40{
30} 41}
31 42
32void Keyring::storePassword(const QByteArray &resourceId, const QString &password) 43void AccountKeyring::storePassword(const QByteArray &resourceId, const QString &password)
33{ 44{
34 QSettings settings{mAccountIdentifier + ".keyring", QSettings::IniFormat}; 45 QSettings settings{mAccountIdentifier + ".keyring", QSettings::IniFormat};
35 settings.setValue(resourceId, password); 46 settings.setValue(resourceId, password);
36 Sink::SecretStore::instance().insert(resourceId, password); 47 Sink::SecretStore::instance().insert(resourceId, password);
37} 48}
38 49
39void Keyring::unlock() 50void AccountKeyring::unlock()
40{ 51{
41 QSettings settings{mAccountIdentifier + ".keyring", QSettings::IniFormat}; 52 QSettings settings{mAccountIdentifier + ".keyring", QSettings::IniFormat};
42 for (const auto &resourceId : settings.allKeys()) { 53 for (const auto &resourceId : settings.allKeys()) {