summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML
diff options
context:
space:
mode:
authorrestena-sw <stefan.winter@restena.lu>2016-01-15 15:13:05 +0100
committerrestena-sw <stefan.winter@restena.lu>2016-01-15 15:13:05 +0100
commit88d51932934e77e12ab2c5d99dda06fbb87a9f51 (patch)
treee7aa0a82ba83e7410fe002de412c243f6dc0a81f /lib/SimpleSAML
parenteb95a83e2610557138faa181790224dbea774d1f (diff)
downloadsimplesamlphp-88d51932934e77e12ab2c5d99dda06fbb87a9f51.zip
simplesamlphp-88d51932934e77e12ab2c5d99dda06fbb87a9f51.tar.gz
simplesamlphp-88d51932934e77e12ab2c5d99dda06fbb87a9f51.tar.bz2
Update HTTP.php
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r--lib/SimpleSAML/Utils/HTTP.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/SimpleSAML/Utils/HTTP.php b/lib/SimpleSAML/Utils/HTTP.php
index 7aaa197..b73cf13 100644
--- a/lib/SimpleSAML/Utils/HTTP.php
+++ b/lib/SimpleSAML/Utils/HTTP.php
@@ -336,7 +336,8 @@ class HTTP
/**
- * Helper function to retrieve a file or URL with proxy support.
+ * Helper function to retrieve a file or URL with proxy support, also
+ * supporting proxy basic authorization..
*
* An exception will be thrown if we are unable to retrieve the data.
*
@@ -361,10 +362,14 @@ class HTTP
$config = \SimpleSAML_Configuration::getInstance();
$proxy = $config->getString('proxy', null);
+ $proxy_auth = $config->getString('proxy.auth', false);
if ($proxy !== null) {
if (!isset($context['http']['proxy'])) {
$context['http']['proxy'] = $proxy;
}
+ if ($proxy_auth !== false) ) {
+ $context['http']['header'] = "Proxy-Authorization: Basic".base64_encode($proxy_auth);
+ }
if (!isset($context['http']['request_fulluri'])) {
$context['http']['request_fulluri'] = true;
}