19 : mUserName( userName )
20 , mPassword( password )
21 , mHttpHeaders( httpHeaders )
33 request.setRawHeader(
"Authorization",
"Basic " + QStringLiteral(
"%1:%2" ).arg(
mUserName,
mPassword ).toUtf8().toBase64() );
static QgsAuthManager * authManager()
Returns the application's authentication manager instance.
bool updateNetworkRequest(QNetworkRequest &request, const QString &authcfg, const QString &dataprovider=QString())
Provider call to update a QNetworkRequest with an authentication config.
bool updateNetworkReply(QNetworkReply *reply, const QString &authcfg, const QString &dataprovider=QString())
Provider call to update a QNetworkReply with an authentication config (used to skip known SSL errors,...
QString mPassword
Password for basic http authentication.
QgsAuthorizationSettings(const QString &userName=QString(), const QString &password=QString(), const QgsHttpHeaders &httpHeaders=QgsHttpHeaders(), const QString &authcfg=QString())
Constructor for QgsAuthorizationSettings.
QString mAuthCfg
Authentication configuration ID.
bool setAuthorization(QNetworkRequest &request) const
Update authorization for request.
QString mUserName
Username for basic http authentication.
QgsHttpHeaders mHttpHeaders
headers for http requests
bool setAuthorizationReply(QNetworkReply *reply) const
Update authorization for reply.