QGIS/python/core/auto_generated/auth/qgsauthmanager.sip.in

807 lines
21 KiB
Plaintext
Raw Normal View History

2017-05-23 09:55:36 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/auth/qgsauthmanager.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAuthManager : QObject
{
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Singleton offering an interface to manage the authentication configuration database
and to utilize configurations through various authentication method plugins
QgsAuthManager should not usually be directly created, but rather accessed through
:py:func:`QgsApplication.authManager()`
%End
2017-05-23 09:55:36 +02:00
%TypeHeaderCode
#include "qgsauthmanager.h"
%End
public:
enum MessageLevel
{
2017-05-23 09:55:36 +02:00
INFO,
WARNING,
CRITICAL
};
bool init( const QString &pluginPath = QString(), const QString &authDatabasePath = QString() );
2017-05-23 09:55:36 +02:00
%Docstring
init initialize QCA, prioritize qca-ossl plugin and optionally set up the authentication database
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param pluginPath: the plugin path
:param authDatabasePath: the authentication DB path
:return: true on success
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`QgsApplication.pluginPath`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`QgsApplication.qgisAuthDatabaseFilePath`
2017-05-23 09:55:36 +02:00
%End
~QgsAuthManager();
QSqlDatabase authDatabaseConnection() const;
2017-05-23 09:55:36 +02:00
%Docstring
Sets up the application instance of the authentication database connection
2017-05-23 09:55:36 +02:00
%End
const QString authDatabaseConfigTable() const;
2017-05-23 09:55:36 +02:00
%Docstring
Name of the authentication database table that stores configs
%End
const QString authDatabaseServersTable() const;
2017-05-23 09:55:36 +02:00
%Docstring
Name of the authentication database table that stores server exceptions/configs
%End
bool isDisabled() const;
2017-05-23 09:55:36 +02:00
%Docstring
Whether QCA has the qca-ossl plugin, which a base run-time requirement
%End
const QString disabledMessage() const;
2017-05-23 09:55:36 +02:00
%Docstring
Standard message for when QCA's qca-ossl plugin is missing and system is disabled
%End
const QString authenticationDatabasePath() const;
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The standard authentication database file in ~/.qgis3/ or defined location
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`QgsApplication.qgisAuthDatabaseFilePath`
2017-05-23 09:55:36 +02:00
%End
bool setMasterPassword( bool verify = false );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Main call to initially set or continually check master password is set
2017-05-23 09:55:36 +02:00
.. note::
If it is not set, the user is asked for its input
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param verify: Whether password's hash was saved in authentication database
2017-05-23 09:55:36 +02:00
%End
bool setMasterPassword( const QString &pass, bool verify = false );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Overloaded call to reset master password or set it initially without user interaction
2017-05-23 09:55:36 +02:00
.. note::
Only use this in trusted reset functions, unit tests or user/app setup scripts!
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param pass: Password to use
:param verify: Whether password's hash was saved in authentication database
2017-05-23 09:55:36 +02:00
%End
bool verifyMasterPassword( const QString &compare = QString() );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Verify the supplied master password against any existing hash in authentication database
2017-05-23 09:55:36 +02:00
.. note::
2017-05-23 09:55:36 +02:00
Do not emit verification signals when only comparing
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param compare: Password to compare against
2017-05-23 09:55:36 +02:00
%End
bool masterPasswordIsSet() const;
2017-05-23 09:55:36 +02:00
%Docstring
Whether master password has be input and verified, i.e. authentication database is accessible
%End
bool masterPasswordHashInDatabase() const;
2017-05-23 09:55:36 +02:00
%Docstring
Verify a password hash existing in authentication database
%End
void clearMasterPassword();
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Clear supplied master password
2017-05-23 09:55:36 +02:00
.. note::
This will not necessarily clear authenticated connections cached in network connection managers
%End
bool masterPasswordSame( const QString &pass ) const;
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Check whether supplied password is the same as the one already set
2017-12-15 21:36:08 -04:00
:param pass: Password to verify
2017-05-23 09:55:36 +02:00
%End
bool resetMasterPassword( const QString &newpass, const QString &oldpass, bool keepbackup, QString *backuppath /In,Out/ = 0 );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Reset the master password to a new one, then re-encrypt all previous
configs in a new database file, optionally backup curren database
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param newpass: New master password to replace existing
:param oldpass: Current master password to replace existing
:param keepbackup: Whether to keep the generated backup of current database
:param backuppath: Where the backup is located, if kept
2017-05-23 09:55:36 +02:00
%End
2016-02-14 03:50:23 +01:00
void setScheduledAuthDatabaseEraseRequestEmitted( bool emitted );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Re-emit a signal to schedule an optional erase of authentication database.
2017-05-23 09:55:36 +02:00
.. note::
This can be called from the slot connected to a previously emitted scheduling signal,
2018-01-12 20:51:17 -04:00
so that the slot can ask for another emit later, if the slot noticies the current GUI
processing state is not ready for interacting with the user, e.g. project is still loading
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param emitted: Setting to false will cause signal to be emitted by the schedule timer.
Setting to true will stop any emitting, but will not stop the schedule timer.
2017-05-23 09:55:36 +02:00
%End
2016-02-14 03:50:23 +01:00
2015-11-08 15:30:11 +00:00
QString authManTag() const;
2017-05-23 09:55:36 +02:00
%Docstring
Simple text tag describing authentication system for message logs
%End
bool registerCoreAuthMethods();
2017-05-23 09:55:36 +02:00
%Docstring
Instantiate and register existing C++ core authentication methods from plugins
%End
QgsAuthMethodConfigsMap availableAuthMethodConfigs( const QString &dataprovider = QString() );
2017-05-23 09:55:36 +02:00
%Docstring
Gets mapping of authentication config ids and their base configs (not decrypted data)
2017-05-23 09:55:36 +02:00
%End
void updateConfigAuthMethods();
2017-05-23 09:55:36 +02:00
%Docstring
Sync the confg/authentication method cache with what is in database
%End
QgsAuthMethod *configAuthMethod( const QString &authcfg );
2017-05-23 09:55:36 +02:00
%Docstring
Gets authentication method from the config/provider cache
2017-12-15 10:36:55 -04:00
2017-12-15 21:36:08 -04:00
:param authcfg: Authentication config id
2017-05-23 09:55:36 +02:00
%End
QString configAuthMethodKey( const QString &authcfg ) const;
2017-05-23 09:55:36 +02:00
%Docstring
Gets key of authentication method associated with config ID
2017-12-15 10:36:55 -04:00
2017-12-15 21:36:08 -04:00
:param authcfg:
2017-05-23 09:55:36 +02:00
%End
QStringList authMethodsKeys( const QString &dataprovider = QString() );
2017-05-23 09:55:36 +02:00
%Docstring
Gets keys of supported authentication methods
2017-05-23 09:55:36 +02:00
%End
2016-02-14 03:50:23 +01:00
QgsAuthMethod *authMethod( const QString &authMethodKey );
2017-05-23 09:55:36 +02:00
%Docstring
Gets authentication method from the config/provider cache via its key
2017-12-15 10:36:55 -04:00
2017-12-15 21:36:08 -04:00
:param authMethodKey: Authentication method key
2017-05-23 09:55:36 +02:00
%End
2016-02-14 03:50:23 +01:00
QWidget *authMethodEditWidget( const QString &authMethodKey, QWidget *parent );
2017-05-23 09:55:36 +02:00
%Docstring
Gets authentication method edit widget via its key
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param authMethodKey: Authentication method key
:param parent: Parent widget
2017-05-23 09:55:36 +02:00
%End
2016-02-14 03:50:23 +01:00
QgsAuthMethod::Expansions supportedAuthMethodExpansions( const QString &authcfg );
2017-05-23 09:55:36 +02:00
%Docstring
Gets supported authentication method expansion(s), e.g. NetworkRequest | DataSourceURI, as flags
2017-12-15 10:36:55 -04:00
2017-12-15 21:36:08 -04:00
:param authcfg:
2017-05-23 09:55:36 +02:00
%End
const QString uniqueConfigId() const;
2017-05-23 09:55:36 +02:00
%Docstring
Gets a unique generated 7-character string to assign to as config id
2017-05-23 09:55:36 +02:00
%End
bool configIdUnique( const QString &id ) const;
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Verify if provided authentication id is unique
2017-12-15 21:36:08 -04:00
:param id: Id to check
2017-05-23 09:55:36 +02:00
%End
bool hasConfigId( const QString &txt ) const;
2017-05-23 09:55:36 +02:00
%Docstring
Returns whether a string includes an authcfg ID token
2017-12-15 10:36:55 -04:00
2017-12-15 21:36:08 -04:00
:param txt: String to check
2017-05-23 09:55:36 +02:00
%End
QString configIdRegex() const;
2017-05-23 09:55:36 +02:00
%Docstring
Returns the regular expression for authcfg=.{7} key/value token for authentication ids
2017-05-23 09:55:36 +02:00
%End
QStringList configIds() const;
2017-05-23 09:55:36 +02:00
%Docstring
Gets list of authentication ids from database
2017-05-23 09:55:36 +02:00
%End
bool storeAuthenticationConfig( QgsAuthMethodConfig &mconfig /In,Out/ );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Store an authentication config in the database
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param mconfig: Associated authentication config id
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
bool updateAuthenticationConfig( const QgsAuthMethodConfig &config );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Update an authentication config in the database
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param config: Associated authentication config id
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
bool loadAuthenticationConfig( const QString &authcfg, QgsAuthMethodConfig &mconfig /In,Out/, bool full = false );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Load an authentication config from the database into subclass
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param authcfg: Associated authentication config id
:param mconfig: Subclassed config to load into
:param full: Whether to decrypt and populate all sensitive data in subclass
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
bool removeAuthenticationConfig( const QString &authcfg );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Remove an authentication config in the database
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param authcfg: Associated authentication config id
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
bool removeAllAuthenticationConfigs();
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Clear all authentication configs from table in database and from provider caches
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
bool backupAuthenticationDatabase( QString *backuppath /In,Out/ = 0 );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Close connection to current authentication database and back it up
:return: Path to backup
2017-05-23 09:55:36 +02:00
%End
bool eraseAuthenticationDatabase( bool backup, QString *backuppath /In,Out/ = 0 );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Erase all rows from all tables in authentication database
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param backup: Whether to backup of current database
:param backuppath: Where the backup is locate
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
2016-02-14 03:50:23 +01:00
2017-05-23 09:55:36 +02:00
bool updateNetworkRequest( QNetworkRequest &request /In,Out/, const QString &authcfg,
const QString &dataprovider = QString() );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Provider call to update a QNetworkRequest with an authentication config
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param request: The QNetworkRequest
:param authcfg: Associated authentication config id
:param dataprovider: Provider key filter, offering logic branching in authentication method
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
2017-05-23 09:55:36 +02:00
bool updateNetworkReply( QNetworkReply *reply, const QString &authcfg,
const QString &dataprovider = QString() );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Provider call to update a QNetworkReply with an authentication config (used to skip known SSL errors, etc.)
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param reply: The QNetworkReply
:param authcfg: Associated authentication config id
:param dataprovider: Provider key filter, offering logic branching in authentication method
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
2017-05-23 09:55:36 +02:00
bool updateDataSourceUriItems( QStringList &connectionItems /In,Out/, const QString &authcfg,
const QString &dataprovider = QString() );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Provider call to update a QgsDataSourceUri with an authentication config
2017-12-15 21:36:08 -04:00
2017-12-19 11:43:52 -04:00
:param connectionItems: The connection items, e.g. username=myname, of :py:class:`QgsDataSourceUri`
2017-12-15 10:36:55 -04:00
:param authcfg: Associated authentication config id
:param dataprovider: Provider key filter, offering logic branching in authentication method
:return: Whether operation succeeded
2017-05-23 09:55:36 +02:00
%End
bool updateNetworkProxy( QNetworkProxy &proxy /In,Out/, const QString &authcfg,
const QString &dataprovider = QString() );
%Docstring
2017-12-15 10:36:55 -04:00
Provider call to update a QNetworkProxy with an authentication config
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param proxy: the QNetworkProxy
:param authcfg: Associated authentication config id
:param dataprovider: Provider key filter, offering logic branching in authentication method
:return: Whether operation succeeded
%End
bool storeAuthSetting( const QString &key, const QVariant &value, bool encrypt = false );
2017-05-23 09:55:36 +02:00
%Docstring
Store an authentication setting (stored as string via QVariant( value ).toString() )
%End
QVariant authSetting( const QString &key, const QVariant &defaultValue = QVariant(), bool decrypt = false );
%Docstring
authSetting get an authentication setting (retrieved as string and returned as QVariant( QString ))
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param key: setting key
:param defaultValue:
:param decrypt: if the value needs decrypted
:return: QVariant( QString ) authentication setting
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool existsAuthSetting( const QString &key );
2017-05-23 09:55:36 +02:00
%Docstring
Check if an authentication setting exists
%End
bool removeAuthSetting( const QString &key );
2017-05-23 09:55:36 +02:00
%Docstring
Remove an authentication setting
%End
bool initSslCaches();
2017-05-23 09:55:36 +02:00
%Docstring
Initialize various SSL authentication caches
%End
bool storeCertIdentity( const QSslCertificate &cert, const QSslKey &key );
2017-05-23 09:55:36 +02:00
%Docstring
Store a certificate identity
%End
const QSslCertificate certIdentity( const QString &id );
2017-05-23 09:55:36 +02:00
%Docstring
certIdentity get a certificate identity by ``id`` (sha hash)
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param id: sha hash of the cert
:return: the certificate
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QStringList certIdentityBundleToPem( const QString &id );
2017-05-23 09:55:36 +02:00
%Docstring
certIdentityBundleToPem get a certificate identity bundle by ``id`` (sha hash) returned as PEM text
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param id: sha hash
:return: a list of strings
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QList<QSslCertificate> certIdentities();
2017-05-23 09:55:36 +02:00
%Docstring
certIdentities get certificate identities
2017-12-15 10:36:55 -04:00
:return: list of certificates
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
QStringList certIdentityIds() const;
2017-05-23 09:55:36 +02:00
%Docstring
certIdentityIds get list of certificate identity ids from database
2017-12-15 10:36:55 -04:00
:return: list of certificate ids
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool existsCertIdentity( const QString &id );
2017-05-23 09:55:36 +02:00
%Docstring
Check if a certificate identity exists
%End
bool removeCertIdentity( const QString &id );
2017-05-23 09:55:36 +02:00
%Docstring
Remove a certificate identity
%End
bool storeSslCertCustomConfig( const QgsAuthConfigSslServer &config );
2017-05-23 09:55:36 +02:00
%Docstring
Store an SSL certificate custom config
%End
const QgsAuthConfigSslServer sslCertCustomConfig( const QString &id, const QString &hostport );
2017-05-23 09:55:36 +02:00
%Docstring
sslCertCustomConfig get an SSL certificate custom config by ``id`` (sha hash) and ``hostport`` (host:port)
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param id: sha hash
:param hostport: string host:port
:return: a SSL certificate custom config
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QgsAuthConfigSslServer sslCertCustomConfigByHost( const QString &hostport );
2017-05-23 09:55:36 +02:00
%Docstring
sslCertCustomConfigByHost get an SSL certificate custom config by ``hostport`` (host:port)
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param hostport: host:port
:return: a SSL certificate custom config
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QList<QgsAuthConfigSslServer> sslCertCustomConfigs();
2017-05-23 09:55:36 +02:00
%Docstring
sslCertCustomConfigs get SSL certificate custom configs
2017-12-15 10:36:55 -04:00
:return: list of SSL certificate custom config
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool existsSslCertCustomConfig( const QString &id, const QString &hostport );
2017-05-23 09:55:36 +02:00
%Docstring
Check if SSL certificate custom config exists
%End
bool removeSslCertCustomConfig( const QString &id, const QString &hostport );
2017-05-23 09:55:36 +02:00
%Docstring
Remove an SSL certificate custom config
%End
void dumpIgnoredSslErrorsCache_();
2017-05-23 09:55:36 +02:00
%Docstring
Utility function to dump the cache for debug purposes
%End
bool updateIgnoredSslErrorsCacheFromConfig( const QgsAuthConfigSslServer &config );
2017-05-23 09:55:36 +02:00
%Docstring
Update ignored SSL error cache with possible ignored SSL errors, using server config
%End
bool updateIgnoredSslErrorsCache( const QString &shahostport, const QList<QSslError> &errors );
2017-05-23 09:55:36 +02:00
%Docstring
Update ignored SSL error cache with possible ignored SSL errors, using sha:host:port key
%End
bool rebuildIgnoredSslErrorCache();
2017-05-23 09:55:36 +02:00
%Docstring
Rebuild ignoredSSL error cache
%End
bool storeCertAuthorities( const QList<QSslCertificate> &certs );
2017-05-23 09:55:36 +02:00
%Docstring
Store multiple certificate authorities
%End
bool storeCertAuthority( const QSslCertificate &cert );
2017-05-23 09:55:36 +02:00
%Docstring
Store a certificate authority
%End
const QSslCertificate certAuthority( const QString &id );
2017-05-23 09:55:36 +02:00
%Docstring
certAuthority get a certificate authority by ``id`` (sha hash)
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param id: sha hash
:return: a certificate
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool existsCertAuthority( const QSslCertificate &cert );
2017-05-23 09:55:36 +02:00
%Docstring
Check if a certificate authority exists
%End
bool removeCertAuthority( const QSslCertificate &cert );
2017-05-23 09:55:36 +02:00
%Docstring
Remove a certificate authority
%End
const QList<QSslCertificate> systemRootCAs();
2017-05-23 09:55:36 +02:00
%Docstring
systemRootCAs get root system certificate authorities
2017-12-15 10:36:55 -04:00
:return: list of certificate authorities
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QList<QSslCertificate> extraFileCAs();
2017-05-23 09:55:36 +02:00
%Docstring
extraFileCAs extra file-based certificate authorities
2017-12-15 10:36:55 -04:00
:return: list of certificate authorities
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QList<QSslCertificate> databaseCAs();
2017-05-23 09:55:36 +02:00
%Docstring
databaseCAs get database-stored certificate authorities
2017-12-15 10:36:55 -04:00
:return: list of certificate authorities
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QMap<QString, QSslCertificate> mappedDatabaseCAs();
2017-05-23 09:55:36 +02:00
%Docstring
mappedDatabaseCAs get sha1-mapped database-stored certificate authorities
2017-12-15 10:36:55 -04:00
:return: sha1-mapped certificate authorities
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool rebuildCaCertsCache();
2017-05-23 09:55:36 +02:00
%Docstring
Rebuild certificate authority cache
%End
bool storeCertTrustPolicy( const QSslCertificate &cert, QgsAuthCertUtils::CertTrustPolicy policy );
2017-05-23 09:55:36 +02:00
%Docstring
Store user trust value for a certificate
%End
QgsAuthCertUtils::CertTrustPolicy certTrustPolicy( const QSslCertificate &cert );
2017-05-23 09:55:36 +02:00
%Docstring
certTrustPolicy get whether certificate ``cert`` is trusted by user
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param cert:
:return: DefaultTrust if certificate sha not in trust table, i.e. follows default trust policy
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool removeCertTrustPolicies( const QList<QSslCertificate> &certs );
2017-05-23 09:55:36 +02:00
%Docstring
Remove a group certificate authorities
%End
bool removeCertTrustPolicy( const QSslCertificate &cert );
2017-05-23 09:55:36 +02:00
%Docstring
Remove a certificate authority
%End
QgsAuthCertUtils::CertTrustPolicy certificateTrustPolicy( const QSslCertificate &cert );
2017-05-23 09:55:36 +02:00
%Docstring
certificateTrustPolicy get trust policy for a particular certificate ``cert``
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param cert:
:return: DefaultTrust if certificate sha not in trust table, i.e. follows default trust policy
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool setDefaultCertTrustPolicy( QgsAuthCertUtils::CertTrustPolicy policy );
2017-05-23 09:55:36 +02:00
%Docstring
2018-05-25 13:56:58 +10:00
Sets the default certificate trust policy preferred by user
2017-05-23 09:55:36 +02:00
%End
QgsAuthCertUtils::CertTrustPolicy defaultCertTrustPolicy();
2017-05-23 09:55:36 +02:00
%Docstring
Gets the default certificate trust policy preferred by user
2017-05-23 09:55:36 +02:00
%End
const QMap<QgsAuthCertUtils::CertTrustPolicy, QStringList > certTrustCache();
2017-05-23 09:55:36 +02:00
%Docstring
certTrustCache get cache of certificate sha1s, per trust policy
2017-12-15 10:36:55 -04:00
:return: trust-policy-mapped certificate sha1s
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool rebuildCertTrustCache();
2017-05-23 09:55:36 +02:00
%Docstring
Rebuild certificate authority cache
%End
const QList<QSslCertificate> trustedCaCerts( bool includeinvalid = false );
2017-05-23 09:55:36 +02:00
%Docstring
trustedCaCerts get list of all trusted CA certificates
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param includeinvalid: whether invalid certs needs to be returned
:return: list of certificates
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QList<QSslCertificate> untrustedCaCerts( QList<QSslCertificate> trustedCAs = QList<QSslCertificate>() );
2017-05-23 09:55:36 +02:00
%Docstring
untrustedCaCerts get list of untrusted certificate authorities
2017-12-15 10:36:55 -04:00
:return: list of certificates
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
bool rebuildTrustedCaCertsCache();
2017-05-23 09:55:36 +02:00
%Docstring
Rebuild trusted certificate authorities cache
%End
const QList<QSslCertificate> trustedCaCertsCache();
2017-05-23 09:55:36 +02:00
%Docstring
trustedCaCertsCache cache of trusted certificate authorities, ready for network connections
2017-12-15 10:36:55 -04:00
:return: list of certificates
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
const QByteArray trustedCaCertsPemText();
2017-05-23 09:55:36 +02:00
%Docstring
trustedCaCertsPemText get concatenated string of all trusted CA certificates
2017-12-15 10:36:55 -04:00
:return: bye array with all PEM encoded trusted CAs
.. versionadded:: 3.0
2017-05-23 09:55:36 +02:00
%End
2017-05-23 09:55:36 +02:00
static const QString AUTH_PASSWORD_HELPER_DISPLAY_NAME;
static const QString AUTH_MAN_TAG;
signals:
void passwordHelperFailure();
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Signals emitted on password helper failure,
mainly used in the tests to exit main application loop
2017-05-23 09:55:36 +02:00
%End
void passwordHelperSuccess();
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Signals emitted on password helper success,
mainly used in the tests to exit main application loop
2017-05-23 09:55:36 +02:00
%End
void messageOut( const QString &message, const QString &tag = QgsAuthManager::AUTH_MAN_TAG, QgsAuthManager::MessageLevel level = QgsAuthManager::INFO ) const;
%Docstring
2017-12-19 11:43:52 -04:00
Custom logging signal to relay to console output and :py:class:`QgsMessageLog`
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param message: Message to send
:param tag: Associated tag (title)
:param level: Message log level
.. seealso:: :py:class:`QgsMessageLog`
2017-05-23 09:55:36 +02:00
%End
void passwordHelperMessageOut( const QString &message, const QString &tag = QgsAuthManager::AUTH_MAN_TAG, QgsAuthManager::MessageLevel level = QgsAuthManager::INFO );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Custom logging signal to inform the user about master password <-> password manager interactions
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param message: Message to send
:param tag: Associated tag (title)
:param level: Message log level
.. seealso:: :py:class:`QgsMessageLog`
2017-05-23 09:55:36 +02:00
%End
void masterPasswordVerified( bool verified );
2017-05-23 09:55:36 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when a password has been verify (or not)
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param verified: The state of password's verification
2017-05-23 09:55:36 +02:00
%End
void authDatabaseEraseRequested();
2017-05-23 09:55:36 +02:00
%Docstring
Emitted when a user has indicated they may want to erase the authentication db.
%End
void authDatabaseChanged();
2017-05-23 09:55:36 +02:00
%Docstring
Emitted when the authentication db is significantly changed, e.g. large record removal, erased, etc.
%End
public slots:
void clearAllCachedConfigs();
2017-05-23 09:55:36 +02:00
%Docstring
Clear all authentication configs from authentication method caches
%End
void clearCachedConfig( const QString &authcfg );
2017-05-23 09:55:36 +02:00
%Docstring
Clear an authentication config from its associated authentication method cache
%End
protected:
2017-05-23 09:55:36 +02:00
};
2017-05-23 09:55:36 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/auth/qgsauthmanager.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/