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.

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

报告相同问题?

悬赏问题

  • ¥15 安装svn网络有问题怎么办
  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献