简体   繁体   中英

how to authenticate web service url in php(nusoap)

I just learn how to create a web service and consume it using PHP and (nusoap) . now I am confused on how to authenticate a web service URL.

For example I have a web service that has a URL like below

       <?php
  include_once './lib/nusoap.php';
   $server = new nusoap_server();
  //print_r($server);
 $server->register('abc');
 function abc()
  {
    return 'welcoem';
  }
  $server->service($HTTP_RAW_POST_DATA);
  exit();
 ?>

 localhost/nusoap/webservice91.php

So I give it to a client. but I want to know is that particular person is using web service to whom I give them a URL.

How to get to know if another person is using our web service.

There are several options technically:

  1. HTTP authentication
  2. Soap-based authentication via soap headers.
  3. Roll-your-own authentication with username/password or token being embedded in the soap body as part of the actual request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM