signon
8.42
|
Main singleton and manager object of the credentials database system. More...
#include <credentialsaccessmanager.h>
Signals | |
void | credentialsSystemReady () |
Is emitted when the credentials system becomes ready. |
Public Member Functions | |
CredentialsAccessManager (const CAMConfiguration &configuration, QObject *parent=0) | |
Constructs a CredentialsAccessManager object with the given parent. | |
~CredentialsAccessManager () | |
Destroys a CredentialsAccessManager. | |
bool | init () |
Initializes the CAM instance. | |
void | finalize () |
Finalizes the CAM instance, this could include, closing the credentials system and resetting the configuration. | |
void | addKeyManager (SignOn::AbstractKeyManager *keyManager) |
Adds a key manager. | |
bool | initExtension (QObject *object) |
Initializes know objects from an extension plugin. | |
QStringList | backupFiles () const |
bool | openCredentialsSystem () |
Opens the credentials system, creates the CreadentialsDB object; if encryption is configured this will also mount the encrypted file system, based on the AccessControlHandler obtained keys. | |
bool | closeCredentialsSystem () |
Closes the credentials system. | |
bool | deleteCredentialsSystem () |
Deletes the credentials system. | |
bool | credentialsSystemOpened () const |
For convenience method. | |
bool | isCredentialsSystemReady () const |
The creadentials system is ready when all of the subscribed key managers have successfully reported all of the inserted keys. | |
CredentialsDB * | credentialsDB () const |
const CAMConfiguration & | configuration () const |
CredentialsAccessError | lastError () const |
bool | keysAvailable () const |
The CAM manages the encryption keys collection. |
Static Public Member Functions | |
static CredentialsAccessManager * | instance () |
Returns CAM instance. |
Protected Member Functions | |
void | customEvent (QEvent *event) |
Main singleton and manager object of the credentials database system.
Offers access to the CredentialsDB and AccessControl objects, using a specific configuration (e.g. Access to a SQL database created on an encrypted file system which is mounted by this system). Most calls of this object's methods return false or NULL in case of failure; the specific error code can be retrieved by calling the lastError() method.
Definition at line 193 of file credentialsaccessmanager.h.
CredentialsAccessManager::CredentialsAccessManager | ( | const CAMConfiguration & | configuration, |
QObject * | parent = 0 |
||
) |
Constructs a CredentialsAccessManager object with the given parent.
configuration | The configuration to use. |
parent | A parent QObject. |
Definition at line 127 of file credentialsaccessmanager.cpp.
References BLAME.
CredentialsAccessManager::~CredentialsAccessManager | ( | ) |
Destroys a CredentialsAccessManager.
Closes the credentials access system
Definition at line 153 of file credentialsaccessmanager.cpp.
References closeCredentialsSystem().
void CredentialsAccessManager::addKeyManager | ( | SignOn::AbstractKeyManager * | keyManager | ) |
Adds a key manager.
This method must be called before init().
keyManager | The key manager to add. |
Definition at line 274 of file credentialsaccessmanager.cpp.
Referenced by initExtension().
QStringList CredentialsAccessManager::backupFiles | ( | ) | const |
Definition at line 378 of file credentialsaccessmanager.cpp.
bool CredentialsAccessManager::closeCredentialsSystem | ( | ) |
Closes the credentials system.
Definition at line 492 of file credentialsaccessmanager.cpp.
References credentialsSystemOpened(), SignonDaemonNS::NoError, and RETURN_IF_NOT_INITIALIZED.
Referenced by deleteCredentialsSystem(), finalize(), and ~CredentialsAccessManager().
|
inline |
Definition at line 346 of file credentialsaccessmanager.h.
CredentialsDB * CredentialsAccessManager::credentialsDB | ( | ) | const |
Definition at line 523 of file credentialsaccessmanager.cpp.
References RETURN_IF_NOT_INITIALIZED.
Referenced by SignonDaemonNS::SignonIdentity::addReference(), SignonDaemonNS::SignonAuthSessionAdaptor::process(), SignonDaemonNS::SignonIdentity::queryInfo(), SignonDaemonNS::SignonIdentity::queryUiSlot(), SignonDaemonNS::SignonIdentity::remove(), SignonDaemonNS::SignonIdentity::removeReference(), SignonDaemonNS::SignonIdentity::signOut(), SignonDaemonNS::SignonIdentity::storeCredentials(), SignonDaemonNS::SignonIdentity::verifySecret(), and SignonDaemonNS::SignonIdentity::verifyUiSlot().
|
inline |
For convenience method.
Definition at line 326 of file credentialsaccessmanager.h.
Referenced by closeCredentialsSystem().
|
signal |
Is emitted when the credentials system becomes ready.
Referenced by init().
|
protected |
Definition at line 615 of file credentialsaccessmanager.cpp.
References SignonDaemonNS::CredentialsDB::isSecretsDBOpen(), SignonDaemonNS::SecureStorageEvent::m_sender, SIGNON_SECURE_STORAGE_NOT_AVAILABLE, and TRACE.
bool CredentialsAccessManager::deleteCredentialsSystem | ( | ) |
Deletes the credentials system.
Definition at line 510 of file credentialsaccessmanager.cpp.
References BLAME, closeCredentialsSystem(), and RETURN_IF_NOT_INITIALIZED.
void CredentialsAccessManager::finalize | ( | ) |
Finalizes the CAM instance, this could include, closing the credentials system and resetting the configuration.
After this call the CAM needs to be reinitialized.
Definition at line 165 of file credentialsaccessmanager.cpp.
References closeCredentialsSystem(), SignonDaemonNS::NoError, and TRACE.
bool CredentialsAccessManager::init | ( | ) |
Initializes the CAM instance.
If encryption is in use, this will start the key managers and create the CryptoManager object, preparing everything for the mounting of the encrypted file system.
Definition at line 180 of file credentialsaccessmanager.cpp.
References SignonDaemonNS::CAMConfiguration::accessControlManagerName(), SignonDaemonNS::AlreadyInitialized, BLAME, credentialsSystemReady(), SignonDaemonNS::CAMConfiguration::cryptoManagerName(), SignonDaemonNS::CAMConfiguration::m_settings, SignonDaemonNS::NoError, SignonDaemonNS::CAMConfiguration::secretsStorageName(), SignonDaemonNS::CAMConfiguration::serialize(), TRACE, and SignonDaemonNS::CAMConfiguration::useEncryption().
bool CredentialsAccessManager::initExtension | ( | QObject * | object | ) |
Initializes know objects from an extension plugin.
extension | A signon extension plugin. |
Definition at line 280 of file credentialsaccessmanager.cpp.
References SignonDaemonNS::CAMConfiguration::accessControlManagerName(), addKeyManager(), SignonDaemonNS::CAMConfiguration::cryptoManagerName(), SignonDaemonNS::CAMConfiguration::secretsStorageName(), and TRACE.
|
static |
Returns CAM instance.
Definition at line 160 of file credentialsaccessmanager.cpp.
Referenced by SignonDaemonNS::SignonIdentity::addReference(), SignonDaemonNS::SignonAuthSessionAdaptor::process(), SignonDaemonNS::SignonSessionCore::process(), SignonDaemonNS::SignonIdentity::queryInfo(), SignonDaemonNS::SignonIdentity::queryUiSlot(), SignonDaemonNS::SignonIdentity::remove(), SignonDaemonNS::SignonIdentity::removeReference(), SignonDaemonNS::SignonSessionCore::SignonSessionCore(), SignonDaemonNS::SignonIdentity::signOut(), SignonDaemonNS::SignonIdentity::storeCredentials(), SignonDaemonNS::SignonIdentity::verifySecret(), and SignonDaemonNS::SignonIdentity::verifyUiSlot().
bool CredentialsAccessManager::isCredentialsSystemReady | ( | ) | const |
The creadentials system is ready when all of the subscribed key managers have successfully reported all of the inserted keys.
The credentials system can be ready while at the same time the secure storage is not opened.
Definition at line 530 of file credentialsaccessmanager.cpp.
bool CredentialsAccessManager::keysAvailable | ( | ) | const |
The CAM manages the encryption keys collection.
Definition at line 584 of file credentialsaccessmanager.cpp.
|
inline |
Definition at line 352 of file credentialsaccessmanager.h.
bool CredentialsAccessManager::openCredentialsSystem | ( | ) |
Opens the credentials system, creates the CreadentialsDB object; if encryption is configured this will also mount the encrypted file system, based on the AccessControlHandler obtained keys.
First call of this method on a specific platform also does the formatting prior to the effective opening.
Definition at line 465 of file credentialsaccessmanager.cpp.
References BLAME, and RETURN_IF_NOT_INITIALIZED.