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 全书网Java爬取数据
  • ¥15 SAP HANA SQL Script 。SUM OVER 怎么加where
  • ¥15 怎么获取红包封面的原始链接,并且获取红包封面序列号
  • ¥100 微信小程序跑脚本授权的问题
  • ¥60 为什么使用python对地震数据进行umap降维后,数据成图会出现不连续的现象
  • ¥100 房产抖音小程序苹果搜不到安卓可以付费悬赏
  • ¥15 STM32串口接收问题
  • ¥15 腾讯IOA系统怎么在文件夹里修改办公网络的连接
  • ¥15 filenotfounderror:文件是存在的,权限也给了,但还一直报错
  • ¥15 安卓qpython向ksweb服务器post文件失败