17#ifndef QGSCREDENTIALS_H
18#define QGSCREDENTIALS_H
69 bool get(
const QString &realm, QString &username
SIP_INOUT, QString &password
SIP_INOUT,
const QString &message = QString(),
bool requestCredentials =
true );
80 void put(
const QString &realm,
const QString &username,
const QString &password );
82 bool getMasterPassword( QString &password
SIP_INOUT,
bool stored =
false );
102 QMutex *
mutex() {
return &mAuthMutex; }
112 virtual bool request(
const QString &realm, QString &username
SIP_INOUT, QString &password
SIP_INOUT,
const QString &message = QString() ) = 0;
128 QMap< QString, QPair<QString, QString> > mCredentialCache;
159 bool request(
const QString &realm, QString &username
SIP_INOUT, QString &password
SIP_INOUT,
const QString &message = QString() )
override;
160 bool requestMasterPassword( QString &password
SIP_INOUT,
bool stored =
false )
override;
184 bool request(
const QString &realm, QString &username
SIP_INOUT, QString &password
SIP_INOUT,
const QString &message = QString() )
override;
185 bool requestMasterPassword( QString &password
SIP_INOUT,
bool stored =
false )
override;
Implementation of credentials interface for the console.
void destroyed()
signals that object will be destroyed and shouldn't be used anymore
Default implementation of credentials interface.
void destroyed()
signals that object will be destroyed and shouldn't be used anymore
Interface for requesting credentials in QGIS in GUI independent way.
QMutex * mutex()
Returns pointer to mutex.
virtual bool requestMasterPassword(QString &password, bool stored=false)=0
request a master password
QgsCredentials()=default
Constructor for QgsCredentials.
virtual ~QgsCredentials()=default
Destructor.
virtual bool request(const QString &realm, QString &username, QString &password, const QString &message=QString())=0
request a password