19 : mConfiguration( configuration )
114 return tr(
"Auth storage %1" ).arg(
name() );
120 if ( !caps.testFlag( capability ) )
122 throw QgsNotSupportedException( tr(
"Capability %1 is not supported by storage %2" ).arg( qgsEnumValueToKey<Qgis::AuthConfigurationStorageCapability>( capability ),
name() ) );
QFlags< AuthConfigurationStorageCapability > AuthConfigurationStorageCapabilities
Authentication configuration storage capabilities.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
AuthConfigurationStorageCapability
Authentication configuration storage capabilities.
QMap< QString, QVariant > mConfiguration
Store the implementation-specific configuration.
void readOnlyChanged(bool readOnly)
Emitted when the storage read-only status was changed.
QString mLastError
Store the last error message.
void certIdentityChanged()
Emitted when the storage cert identity table was changed.
void setCapabilities(Qgis::AuthConfigurationStorageCapabilities capabilities)
Set the capabilities of the storage to capabilities.
virtual void setReadOnly(bool readOnly)
Utility method to unset all editing capabilities.
void methodConfigChanged()
Emitted when the storage method config table was changed.
void setError(const QString &error, Qgis::MessageLevel level=Qgis::MessageLevel::Critical)
Set the last error message to error with message level level.
Qgis::AuthConfigurationStorageCapabilities capabilities() const
Returns the capabilities of the storage.
virtual QString loggerTag() const
Returns the logger tag for the storage.
bool isEnabled() const
Returns true if the storage is enabled.
void setEnabled(bool enabled)
Set the storage enabled status to enabled.
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 masterPasswordChanged()
Emitted when the storage master password table was changed.
QgsAuthConfigurationStorage(const QMap< QString, QVariant > &settings)
Creates a new authentication configuration storage.
void certAuthorityChanged()
Emitted when the storage cert authority table was changed.
bool isEncrypted() const
Returns true if the storage is encrypted.
void messageLog(const QString &message, const QString &tag=QStringLiteral("Authentication"), Qgis::MessageLevel level=Qgis::MessageLevel::Info)
Custom logging signal to relay to console output and QgsMessageLog.
bool mIsEnabled
Store whether the storage is enabled.
void sslCertCustomConfigChanged()
Emitted when the storage ssl cert custom config table was changed.
bool mIsReadOnly
Store whether the storage is read-only.
void authSettingsChanged()
Emitted when the storage auth settings table was changed.
void storageChanged(const QString &id)
Emitted when the storage was updated.
virtual QString lastError() const
Returns the last error message.
bool mIsEncrypted
Store whether the storage is encrypted.
void checkCapability(Qgis::AuthConfigurationStorageCapability capability) const
Utility to check capability and throw QgsNotSupportedException if not supported.
virtual bool isReadOnly() const
Returns true if the storage is read-only, false otherwise.
QMap< QString, QVariant > settings() const
Returns the settings of the storage.
Qgis::AuthConfigurationStorageCapabilities mCapabilities
Store the capabilities of the storage.
Custom exception class which is raised when an operation is not supported.