doure8758 2013-07-01 20:10
浏览 23
已采纳

PHP客户端和.Net服务器之间的身份验证[关闭]

I intent on creating a PHP application that regularly calls into an ASP.Net website to check for updates and then make another call to download updates).

  • I will be using SSL for transport security.
  • The clients need to be PHP as they run other bespoke bash commands.
  • I will need to download data and I've not decided what form.

Can anyone please suggest for my .net application:

  • How to restrict access to the server (I won't know incoming request IP's)?
  • The best structured data transport mechanism? maybe I could use JSON?

nb. if I can create a web service that PHP could consume that's even better!

  • 写回答

1条回答 默认 最新

  • doupi3874 2013-07-01 20:36
    关注

    Using JSON is definitively a good idea. It's less verbose than xml and fit particularly well with object oriented programming.

    For your authentication issue, you could pass over each request an authentication token (a random string) that only your web service and your PHP code will know. This is safe since SSL will encrypt the request and your auth token will never be "clear" on the network.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 fluent无法启动
  • ¥15 孟德尔随机化r语言运行问题
  • ¥15 pyinstaller编译的时候出现No module named 'imp'
  • ¥15 nirs_kit中打码怎么看(打码文件是csv格式)
  • ¥15 怎么把多于硬盘空间放到根目录下
  • ¥15 Matlab问题解答有两个问题
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架
  • ¥15 有关sql server business intellige安装,包括SSDT、SSMS。