mirror of
https://github.com/status-im/dotherside.git
synced 2025-02-21 00:48:14 +00:00
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
41 lines
798 B
C++
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
|