diff options
Diffstat (limited to 'framework/src/keyring.cpp')
-rw-r--r-- | framework/src/keyring.cpp | 17 |
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 | ||
24 | using namespace Kube; | 24 | using namespace Kube; |
25 | 25 | ||
26 | Keyring::Keyring(const QByteArray &accountId, QObject *parent) | 26 | Keyring::Keyring() |
27 | : QObject() | ||
28 | { | ||
29 | |||
30 | } | ||
31 | |||
32 | bool Keyring::isUnlocked(const QByteArray &accountId) | ||
33 | { | ||
34 | return false; | ||
35 | } | ||
36 | |||
37 | AccountKeyring::AccountKeyring(const QByteArray &accountId, QObject *parent) | ||
27 | : QObject(parent), | 38 | : QObject(parent), |
28 | mAccountIdentifier(accountId) | 39 | mAccountIdentifier(accountId) |
29 | { | 40 | { |
30 | } | 41 | } |
31 | 42 | ||
32 | void Keyring::storePassword(const QByteArray &resourceId, const QString &password) | 43 | void 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 | ||
39 | void Keyring::unlock() | 50 | void 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()) { |