Skip to content

Commit

Permalink
[auth] Apply proxy stored auth configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 25, 2017
1 parent 07e1bd9 commit fded019
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/qgsnetworkaccessmanager.cpp
Expand Up @@ -323,6 +323,7 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
//read type, host, port, user, passw from settings
QString proxyHost = settings.value( QStringLiteral( "proxy/proxyHost" ), "" ).toString();
int proxyPort = settings.value( QStringLiteral( "proxy/proxyPort" ), "" ).toString().toInt();

QString proxyUser = settings.value( QStringLiteral( "proxy/proxyUser" ), "" ).toString();
QString proxyPassword = settings.value( QStringLiteral( "proxy/proxyPassword" ), "" ).toString();

Expand Down Expand Up @@ -367,6 +368,13 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
}
}

// Setup network proxy authentication configuration
QString authcfg = settings.value( QStringLiteral( "proxy/authcfg" ), "" ).toString();
if ( !authcfg.isEmpty( ) )
{
QgsAuthManager::instance()->updateNetworkProxy( proxy, authcfg );
}

setFallbackProxyAndExcludes( proxy, excludes );

QgsNetworkDiskCache *newcache = qobject_cast<QgsNetworkDiskCache *>( cache() );
Expand Down

0 comments on commit fded019

Please sign in to comment.