Web services & authentication

Hello,

are there some examples (or can anyone provide me with one) on how authentication is done when using webservices?

To the best of my knowledge it’s no difference server side.

Client side, I tested with this code:




  $client = new SoapClient('http://192.168.4.28/index.php/item/itemsWS');

  

  echo 'Results from getCurrentItems():<br>';

  $status = $client->login('demo', 'demo');

  if ($status)

  {

    $data = $client->getCurrentItems();

    show($data);

  }

  else

    echo 'Not logged in<br>';



.NET client will need to have a CookieContainer added.

/Tommy

I think you could just pass the username/password and create some session variables.

Something like here -

http://rowsandcolumns.blogspot.com/2011/02/yii-web-service-and-php-soap-client.html

Is there a better idea?