Skip to content
Permalink
Browse files

[auth] Apply proxy stored auth configuration

  • Loading branch information
elpaso committed Sep 25, 2017
1 parent 07e1bd9 commit fded01983f87e07f638693ea714f0e884c400dc0
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/qgsnetworkaccessmanager.cpp
@@ -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();

@@ -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() );

0 comments on commit fded019

Please sign in to comment.
You can’t perform that action at this time.