Skip to content
This repository

http authentication #1

Closed
bthibault opened this Issue · 5 comments

2 participants

bthibault Dmitry Koterov
bthibault

Dklab_SoapClient doesn't appear to work with http authentication

I.e. new Dklab_SoapClient($wsdl, array('login' => 'foo', 'password' => 'bar');

however this works: SoapClient($wsdl, array('login' => 'foo', 'password' => 'bar');

I don't think the problem is in the constructor, I think it's later down in the call

bthibault

if (isset($clientOptions['login']) && isset($clientOptions['password']) ) {
$curlOptions[CURLOPT_USERPWD] = $clientOptions['login'] . ":" . $clientOptions['password'];
}
add this at line 319 and will fix. I'll try to submit a patch later

Dmitry Koterov

Added, thanks:
dafe876

bthibault

I should mention the proper use for this is to provide 'login' and 'password' options, but also if trying to access a protected WSDL the url should be http://login@password:foobar.com/wsdl

Thanks Dmitry!

Dmitry Koterov
bthibault

unfortunately thats just the way SoapClient works in php ... so no real patch to be had. https://bugs.php.net/bug.php?id=27777

So with previous patch and using the username and pass in the URL solves the problem. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.