16#ifndef QGSAUTHCONFIGURATIONSTORAGE_H
17#define QGSAUTHCONFIGURATIONSTORAGE_H
74 virtual QString
name()
const = 0;
81 virtual QString
type()
const = 0;
93 virtual QString
id()
const = 0;
108 virtual QString lastError()
const;
124 QMap<QString, QVariant> settings()
const;
134 bool isEncrypted()
const;
139 bool isEnabled()
const;
145 void setEnabled(
bool enabled );
152 virtual void setReadOnly(
bool readOnly );
158 virtual bool isReadOnly()
const;
501 void messageLog( const QString &message, const QString &tag = QStringLiteral( "Authentication" ),
Qgis::MessageLevel level =
Qgis::MessageLevel::Info );
510 void storageChanged( const QString &
id );
515 void methodConfigChanged( );
520 void masterPasswordChanged();
525 void authSettingsChanged();
530 void readOnlyChanged(
bool readOnly );
579 virtual QString loggerTag()
const;
599 bool mIsEncrypted =
true;
604 bool mIsEnabled =
true;
609 bool mIsReadOnly =
false;
The Qgis class provides global constants for use throughout the application.
QFlags< AuthConfigurationStorageCapability > AuthConfigurationStorageCapabilities
Authentication configuration storage capabilities.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
@ Critical
Critical/error message.
AuthConfigurationStorageCapability
Authentication configuration storage capabilities.
Utilities for working with certificates and keys.
Configuration container for SSL server connection exceptions or overrides.
Abstract class that defines the interface for all authentication configuration storage implementation...
QMap< QString, QVariant > mConfiguration
Store the implementation-specific configuration.
QString mLastError
Store the last error message.
virtual QString description() const =0
Returns a human readable localized description of the storage implementation (e.g.
void certIdentityChanged()
Emitted when the storage cert identity table was changed.
virtual QgsAuthMethodConfigsMap authMethodConfigs(const QStringList &allowedMethods=QStringList()) const =0
Returns a mapping of authentication configurations available from this storage.
virtual bool removeCertIdentity(const QSslCertificate &cert)=0
Remove a certificate identity from the storage.
virtual bool isReady() const =0
Returns true is the storage is ready to be used.
virtual QString type() const =0
Returns the type of the storage implementation.
virtual bool initialize()
Initializes the storage.
virtual const QList< QSslCertificate > certIdentities() const =0
certIdentities get certificate identities
virtual QList< QgsAuthConfigurationStorage::SettingParameter > settingsParameters() const =0
Returns a list of the settings accepted by the storage.
virtual const QSslCertificate loadCertIdentity(const QString &id) const =0
certIdentity get a certificate identity by id (sha hash)
virtual bool storeCertIdentity(const QSslCertificate &cert, const QString &keyPem)=0
Store a certificate identity in the storage.
virtual QString name() const =0
Returns a human readable localized short name of the storage implementation (e.g "SQLite").
void sslCertTrustPolicyChanged()
Emitted when the storage ssl cert trust policy table was changed.
void certAuthorityChanged()
Emitted when the storage cert authority table was changed.
void sslCertCustomConfigChanged()
Emitted when the storage ssl cert custom config table was changed.
virtual const QPair< QSslCertificate, QString > loadCertIdentityBundle(const QString &id) const =0
Returns a certificate identity bundle by id (sha hash).
virtual QString id() const =0
Returns the unique identifier of the storage object.
virtual const QList< QgsAuthConfigurationStorage::MasterPasswordConfig > masterPasswords() const =0
Returns the list of (encrypted) master passwords stored in the database.
virtual ~QgsAuthConfigurationStorage()
Qgis::AuthConfigurationStorageCapabilities mCapabilities
Store the capabilities of the storage.
Configuration storage class for authentication method configurations.
Custom exception class which is raised when an operation is not supported.
#define SIP_THROW(name,...)
QHash< QString, QgsAuthMethodConfig > QgsAuthMethodConfigsMap
Structure that holds the (encrypted) master password elements.
Storage configuration setting parameter.