Merge pull request #31 from mremi/http-auth
Added extra option to configure HTTP authentication
This commit is contained in:
commit
dc6e1e0889
|
@ -88,7 +88,7 @@ class Curl
|
||||||
curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, $options['proxy_user'] . ':' . $options['proxy_password']);
|
curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, $options['proxy_user'] . ':' . $options['proxy_password']);
|
||||||
}
|
}
|
||||||
if (isset($options['login'])) {
|
if (isset($options['login'])) {
|
||||||
curl_setopt($this->ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
|
curl_setopt($this->ch, CURLOPT_HTTPAUTH, isset($options['extra_options']['http_auth']) ? $options['extra_options']['http_auth'] : CURLAUTH_ANY);
|
||||||
curl_setopt($this->ch, CURLOPT_USERPWD, $options['login'].':'.$options['password']);
|
curl_setopt($this->ch, CURLOPT_USERPWD, $options['login'].':'.$options['password']);
|
||||||
}
|
}
|
||||||
if (isset($options['local_cert'])) {
|
if (isset($options['local_cert'])) {
|
||||||
|
|
|
@ -113,6 +113,11 @@ class SoapClient extends \SoapClient
|
||||||
$this->cliWebserverWorkaround = $options['cli_webserver_workaround'];
|
$this->cliWebserverWorkaround = $options['cli_webserver_workaround'];
|
||||||
}
|
}
|
||||||
$this->curl = new Curl($options);
|
$this->curl = new Curl($options);
|
||||||
|
|
||||||
|
if (isset($options['extra_options'])) {
|
||||||
|
unset($options['extra_options']);
|
||||||
|
}
|
||||||
|
|
||||||
$wsdlFile = $this->loadWsdl($wsdl, $options);
|
$wsdlFile = $this->loadWsdl($wsdl, $options);
|
||||||
// TODO $wsdlHandler = new WsdlHandler($wsdlFile, $this->soapVersion);
|
// TODO $wsdlHandler = new WsdlHandler($wsdlFile, $this->soapVersion);
|
||||||
$this->soapKernel = new SoapKernel();
|
$this->soapKernel = new SoapKernel();
|
||||||
|
|
Loading…
Reference in New Issue