Added extra option to configure HTTP authentication

This commit is contained in:
Rémi Marseille
2014-04-22 22:05:04 +02:00
parent 9ac755d86e
commit 2ae7515294
2 changed files with 6 additions and 1 deletions

View File

@ -88,7 +88,7 @@ class Curl
curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, $options['proxy_user'] . ':' . $options['proxy_password']);
}
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']);
}
if (isset($options['local_cert'])) {