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;
107 virtual QString lastError()
const;
123 QMap<QString, QVariant> settings()
const;
133 bool isEncrypted()
const;
138 bool isEnabled()
const;
144 void setEnabled(
bool enabled );
151 virtual void setReadOnly(
bool readOnly );
157 virtual bool isReadOnly()
const;
500 void messageLog( const QString &message, const QString &tag = QStringLiteral( "Authentication" ),
Qgis::MessageLevel level =
Qgis::MessageLevel::Info );
509 void storageChanged( const QString &
id );
514 void methodConfigChanged( );
519 void masterPasswordChanged();
524 void authSettingsChanged();
529 void readOnlyChanged(
bool readOnly );
578 virtual QString loggerTag()
const;
598 bool mIsEncrypted =
true;
603 bool mIsEnabled =
true;
608 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.