php webservice basic authentication - php

i am creating web service using NUSOAP i want to add basic authentication to the webservice so that client should send authentication header before he will be able to call webservice function so what will be my server side script my client should send basic authentication server before calling to the hello function I want to Secure my webservice functions

To me, this depends on your webserver. For an apache server for example, see this doc

Related

How do I create a PHP WebApi secured with NetworkCredentals?

I have a PHP WebApi. The client is using ASP.Net. The client set the standart that my PHP WebApi must secured with Basic Authentication. But the client request my PHP WebApi with NetworkCredentials. When I set the Basic auth with IIS or PHP the client couldn't access my WebApi.
My question is how can I set the Basic auth which is using NetworkCredentials?
I'm asking to equvalent of it on PHP.

PHP and Integrated Windows Authentication

In C#, it's kind of easy to use windows credentials for making another web request from a web request (using webclient) :
WCF impersonation/ Authentication
Is it possible to make the same with PHP ?
I have a WCF web service that I would call from a PHP script who is on another server that the one where the PHP script is hosted.
Thanks by advance.

Create webservice using Nusoap that requires authentication on PHP

I have web service server using Nusoap on codeigniter, I wonder how I could add an authentication to it?
thanks

Pass-through NTLM authentication in a web app on an IMAP mail server

I'm in need of using NTLM authentication in my web application against an IMAP mail server. Authentication in the web app itself is NTLM too. Thus, the user opens the web app interface and the web server end grabs the inbox of that user on the mail server authenticating via NTLM. Is that possible if I never store (neither I have access to) the user's password?
Is there any way to link the client's browser and the IMAP server via my web app so that token exchange would occur between them and I would just act as a gateway between them. Or, is there any other method to accomplish this task without knowing the password?
The web app can be asp.net/iis or php/apache. Either option will work for me.
Looks like I had a bad day yesterday, otherwise have no idea why I couldn't figure it out that time as it's so simple!
If Windows authentication is enabled, the web app already gets the context of that interactive user who accessed the app. I can then authenticate against NTLM-enabled IMAP server via Integrated Windows Authentication just the same way I would in a desktop application.
I.e. they key point is that there is no need in the web app to somehow pass NTLM token from the browser to the IMAP server. It's just a two stages process:
- first, the browser (running under interactive user) creates NTLM token via winapi functions and sends it to the web app so that finally the app acquires that interactive user context
- then, the web app running under the interactive user context creates a new token via the same winapi functions and sends it to the IMAP server.

PHP SOAP client and SOAP server errors

I have a web server which is acting as a SOAP client to communicate with a third party SOAP server. My client is implemented in PHP using php::soapclient.
What is the best way to verify the SOAP server is functioning so I can provide the client browser with the site otherwise if if the SOAP server is down or not responding inform the user that the service is currently not available?
The system essentially provides a mashup of the third party services offered by using SOAP client/server communication to display data to the browser and let the users interact with the third party system.
well... once i worked with a php soap server and a php soap client. I think that when the client calls the service, it passes through the wsdl and if there's a problem during the conection (or even the execution) server side, the response of the client will be a SoapFault object.. id di something like
$resp = $this->client->__soapCall($serviceName,$serviceParams);
if (get_class($resp)=="SoapFault"){
throw new Exception("Webservice error - Message: ".$resp->faultstring);
}
You could call the http://server:1234/foo/bar?wsdl and if you do get the WSDL back, fire the actual SOAP request.
If the application is down, you probably won't get the WSDL and if it's only a part of the service that makes it hang, there is not much you can do to detect it beforehand anyway.

Categories