Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

http authentication #1

Closed
bthibault opened this Issue Jan 16, 2013 · 5 comments

Comments

Projects
None yet
2 participants

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

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

Owner

DmitryKoterov commented Jan 17, 2013

Added, thanks:
dafe876

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!

Owner

DmitryKoterov commented Jan 29, 2013

Do you have a corresponding patch for that?..

On Thu, Jan 17, 2013 at 7:22 PM, bthibault notifications@github.com wrote:

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!


Reply to this email directly or view it on GitHubhttps://github.com/DmitryKoterov/dklab_soapclient/issues/1#issuecomment-12372247.

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