asp.net - Authenticating a .NET web service using PHP -


i'm working .net server solution provides authentication web service, along several other service urls. access process involves initial call authentication service url, , using 'authenticate' soap call, supposed return access token. token used make calls other service urls retrieve data server.

the issue i'm having provided username , password authentication process, there's no indication of how credentials meant sent server. additionally, i'm trying access web service (.net based) using php.

so far, i've managed use wsdl2php generate classes authentication service url, classes don't provide indication of how username , password meant sent.

i've tried adding credentials soap headers:

$headercontent = "<o:username xmlns:o=\"$namespace\">                     <o:username>$uname</o:username>                     <o:password>$pword</o:password>                   </o:username>"; $headervar = new soapvar($headercontent, xsd_anyxml, null, null, null); $header = new soapheader($namespace, 'o:clientcredentials', $headervar); $this->__setsoapheaders(array($header));   try {     return $this->__soapcall('authenticate', array()); } catch (exception $e) {     throw new exception( 'not allowed.', 0, $e); } 

...but receive 'access denied' message. there proper way pass credentials service in order authenticate?

there many different authentication flavors - forms, basic, oauth. if have way login via browser, suggest running fiddler peek @ message traffic. fiddler middleware tool sits between browser , server. give packet headers - can see encryption, field formatting , content type. should mimic request.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -