summaryrefslogtreecommitdiffstats
path: root/framework/src/keyring.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-21 17:30:25 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-09-22 10:26:27 +0200
commit1b1e83aeb820df85ce7f10e81fe1f44deab2174e (patch)
tree8a137d8f286a3595d9171c24b45655c4b2b03427 /framework/src/keyring.cpp
parent777cb40dae338e79e8f4160882b7c37900b42238 (diff)
downloadkube-1b1e83aeb820df85ce7f10e81fe1f44deab2174e.tar.gz
kube-1b1e83aeb820df85ce7f10e81fe1f44deab2174e.zip
A login view
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()) {