Sale Djenic e79a3e179f feat(@desktop/general): (macos) Keychain manager added
LocalAuthentication class - used to authenticate OS' logged user (using Touch Id)
Keychain class - able to store/read/remove item from the Keychain
KeychainManager class - manages the flow of storing/reading/removing an item from
the Keychain using own sync/async methods

This change is required as part of the feature issue-2675
2021-09-17 12:46:45 -04:00

41 lines
798 B
C++

#ifndef KEYCHAIN_H
#define KEYCHAIN_H
#include <QObject>
namespace Status
{
class Keychain : public QObject
{
Q_OBJECT
public:
enum Error {
NoError=0,
EntryNotFound,
CouldNotDeleteEntry,
AccessDeniedByUser,
AccessDenied,
NoBackendAvailable,
NotImplemented,
OtherError
};
Keychain(const QString& service, QObject *parent = nullptr);
void readItem(const QString& key);
void writeItem(const QString& key, const QString& data);
void deleteItem(const QString& key);
signals:
void success(QString data);
void error(int error, const QString& errorString);
private:
QString m_service;
};
}
#endif