Question

I am instantiating a PHP Soap Client like this:

$client = new SoapClient('http://localhost:8731/MathService?wsdl',array(
'login' => "test2", 'password' => "test"));

When I do this above, the Request contains:

Authorization: Basic dGVzdDI6dGVzdA==

But the above is not being picked up by my CustomUserNamePasswordValidator. I just have the WCF Service running in a Console app, so I do not know how to set the client credentials on the service host. I am using TransportWithCredentialOnly with Basic HTTP and Message="UserName". My CustomUserNamePassword Validator is hard-coded only to accept test and test as the username and password, but even if I pass in test2 to the SoapClient, the operation still passes.

Was it helpful?

Solution

I changed the Security mode to TransportCredentialOnly and the transport clientCredentialType to Basic and it worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top