17 #ifndef QGSCREDENTIALS_H 18 #define QGSCREDENTIALS_H 26 #include "qgis_core.h" 65 bool get(
const QString &realm, QString &username
SIP_INOUT, QString &password
SIP_INOUT,
const QString &message = QString() );
76 void put(
const QString &realm,
const QString &username,
const QString &password );
78 bool getMasterPassword( QString &password SIP_INOUT,
bool stored =
false );
102 Q_DECL_DEPRECATED QMutex *
mutex() SIP_DEPRECATED
115 virtual bool request(
const QString &realm, QString &username SIP_INOUT, QString &password SIP_INOUT,
const QString &message = QString() ) = 0;
118 virtual bool requestMasterPassword( QString &password SIP_INOUT,
bool stored =
false ) = 0;
131 QMap< QString, QPair<QString, QString> > mCredentialCache;
134 static QgsCredentials *sInstance;
158 bool request(
const QString &realm, QString &username
SIP_INOUT, QString &password SIP_INOUT,
const QString &message = QString() )
override;
183 bool request(
const QString &realm, QString &username
SIP_INOUT, QString &password SIP_INOUT,
const QString &message = QString() )
override;
Interface for requesting credentials in QGIS in GUI independent way.
virtual bool requestMasterPassword(QString &password, bool stored=false)=0
request a master password
Default implementation of credentials interface.
virtual bool request(const QString &realm, QString &username, QString &password, const QString &message=QString())=0
request a password
Implementation of credentials interface for the console.
Q_DECL_DEPRECATED QMutex * mutex()
Returns pointer to mutex.