Skip to content
This repository

http authentication #1

bthibault opened this Issue · 5 comments

2 participants

bthibault Dmitry Koterov

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

Dmitry Koterov

Added, thanks:


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

Thanks Dmitry!

Dmitry Koterov

unfortunately thats just the way SoapClient works in php ... so no real patch to be had.

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.