From: Scott N. <sni...@sc...> - 2005-04-13 20:07:59
|
Mark, Glad to hear from you again. I am making changes according to your = findings below. I especially love the line of code if (substr("Digest ", $this->incoming_headers['www-authenticate'])) { Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message -----=20 From: "Mark Spavin" <ma...@an...> To: <nus...@li...> Sent: Wednesday, April 13, 2005 3:27 PM Subject: [Nusoap-general] Typo's I think > Hi All, >=20 > I has been a long time since I posted here last, as the NuSOAP has = been=20 > working well for some time. A current piece of re-work was using a = very old=20 > hacked version of NuSOAP for a demonstration. The new service if more=20 > productionised and has some additions, one being authentication, so I=20 > decided to start with a fresh upto date version of NuSOAP. When using=20 > setCredentials and checking the code I noticed the following (I am not = using=20 > this just noticed when passing) and I think there may be a typo as the = nonce=20 > is checked and default's when required, where the realm is not it is = just=20 > used directly >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > NuSOAP: v 1.86 2005/03/04 > Class: soap_transport_http > Func: setCredentials(........) > : > } elseif ($authtype =3D=3D 'digest') { > if (isset($digestRequest['nonce'])) { >=20 > should be :- >=20 > } elseif ($authtype =3D=3D 'digest') { > if (isset($digestRequest['realm'])) { >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >=20 > The second part relates to what I think is a second typo in = authentication=20 > this bit I was trying to use. When I sent my basic auth everything = looked=20 > okay but I did not know if my connection credentials we right. The = response=20 > headers from the service are shown: >=20 > HTTP/1.1 401 Unauthorized > Date: Wed, 13 Apr 2005 19:01:59 GMT > Server: IBM_HTTP_SERVER/1.3.28.1 Apache/1.3.28 (Win32) > WWW-Authenticate: Basic realm=3D"Default Realm" > Content-Length: 0 > Connection: close > Content-Type: text/html; charset=3DISO-8859-1 > Content-Language: en-US >=20 > This leading to a debug message: Got 401 Unauthorized with = WWW-Authenticate:=20 > Basic realm=3D"Default Realm", this was not unexpected but the next = debug=20 > message was, - Server wants digest authentication. >=20 > On checking the NuSOAP code for this I found the following, the check = for=20 > "Digest" in the response looks a bit suspect! >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > NuSOAP: v 1.86 2005/03/04 > Class: soap_transport_http > Func: getResponse() > : > // see if we need to resend the request with http digest = authentication > if (isset($this->incoming_headers['www-authenticate']) && = $http_status =3D=3D=20 > 401) { > $this->debug("Got 401 $http_reason with WWW-Authenticate: " .=20 > $this->incoming_headers['www-authenticate']); > if (substr("Digest ", = $this->incoming_headers['www-authenticate'])) { >=20 > Should be :- >=20 > // see if we need to resend the request with http digest = authentication > if (isset($this->incoming_headers['www-authenticate']) && = $http_status =3D=3D=20 > 401) { > $this->debug("Got 401 $http_reason with WWW-Authenticate: " .=20 > $this->incoming_headers['www-authenticate']); > if (strstr($this->incoming_headers['www-authenticate'],"Digest ")) = { >=20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >=20 > My authorisation still fails but the debug output is now as = expected!!!! >=20 > Glad to see Scott still bashing away, the latest version digested my = nested=20 > WSDL's without a hitch, so far so good. > Thanks > Scott=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real = users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick > _______________________________________________ > Nusoap-general mailing list > Nus...@li... > https://lists.sourceforge.net/lists/listinfo/nusoap-general > |