diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-22 13:19:30 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-22 13:19:30 +0200 |
commit | 8fa3fddd52e11e9133a3020741f31163d2122034 (patch) | |
tree | e08a2ce0ce7693b937e329d60c9364606bb11d5b /framework/src/keyring.cpp | |
parent | f25a8fb49abf8a9b7ba5d6f8fbd4c05bd647c1c0 (diff) | |
download | kube-8fa3fddd52e11e9133a3020741f31163d2122034.tar.gz kube-8fa3fddd52e11e9133a3020741f31163d2122034.zip |
Avoid storing the password on disk for the time being
Diffstat (limited to 'framework/src/keyring.cpp')
-rw-r--r-- | framework/src/keyring.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/framework/src/keyring.cpp b/framework/src/keyring.cpp index 7bd406c0..26da66c1 100644 --- a/framework/src/keyring.cpp +++ b/framework/src/keyring.cpp | |||
@@ -55,17 +55,12 @@ AccountKeyring::AccountKeyring(const QByteArray &accountId, QObject *parent) | |||
55 | 55 | ||
56 | void AccountKeyring::storePassword(const QByteArray &resourceId, const QString &password) | 56 | void AccountKeyring::storePassword(const QByteArray &resourceId, const QString &password) |
57 | { | 57 | { |
58 | QSettings settings{mAccountIdentifier + ".keyring", QSettings::IniFormat}; | ||
59 | settings.setValue(resourceId, password); | ||
60 | Sink::SecretStore::instance().insert(resourceId, password); | 58 | Sink::SecretStore::instance().insert(resourceId, password); |
61 | Keyring::instance()->unlock(mAccountIdentifier); | 59 | Keyring::instance()->unlock(mAccountIdentifier); |
62 | } | 60 | } |
63 | 61 | ||
64 | void AccountKeyring::unlock() | 62 | void AccountKeyring::unlock() |
65 | { | 63 | { |
66 | QSettings settings{mAccountIdentifier + ".keyring", QSettings::IniFormat}; | 64 | //TODO load passwords from an on disk keyring |
67 | for (const auto &resourceId : settings.allKeys()) { | ||
68 | Sink::SecretStore::instance().insert(resourceId.toLatin1(), settings.value(resourceId).toString()); | ||
69 | } | ||
70 | } | 65 | } |
71 | 66 | ||