I have an online application with PHP & MySQL. I need to provide some functionality using a a desktop application built in C#. My task includes follwoing..
- Authentication
- Database query
Please suggest me a proper way to proceed with this scenario.
Some of my doubts..
- should I use webservice in my PHP end?
- How to authenticate?
- any security issue?
Yes. You will need to build a webservice on the PHP end, that contains a method that will execute your query. You can then add a ‘Service Reference’ in your C# application to the PHP service.
Regarding authentication: it depends on your scenario. If you are the only user of the webservice you can use basic authentication (over HTTPS) to ensure that your credentials are safe from sniffers.
Problem with security is that you will have to rely on tokens, keys, or something. And because these are stored on the desktop computer that uses the software, someone can steal these secrets (by using a decompiler f.e.). If security is really important, you will need to rely on 3rd party solutions like DigiPass.