简体   繁体   English

在Mac OS X首选项窗格应用程序和php5 Web应用程序之间进行通信

[英]Communicating between Mac OS X Preference Pane app and php5 web app

Wondering what the best method is for communicating between a 10.5/10.6+ System Preference Pane application to our php5 web application. 想知道在10.5 / 10.6 +系统偏好窗格应用程序与我们的php5 Web应用程序之间进行通信的最佳方法是什么。

The Preference Pane application that we've yet to develop will allow the client to authenticate to our online services, then allow them to control how their local client is backed up to our online backup facilities. 我们尚未开发的“首选项窗格”应用程序将允许客户端对我们的在线服务进行身份验证,然后允许他们控制如何将其本地客户端备份到我们的在线备份工具。

Such far, for example; 例如,到目前为止; we've created a testing Preference Pane app that takes the username & password, performs a sha256 hash of the password and POSTS it to an URL like: https://development.private/app.php?username=cleartext&password=sha256hash - once our application responds correctly, the Preference Pane application then pushes all options enabled/disabled via further POSTS calls like: https://development.private/app.php?option1=enable&option2=something . 我们已经创建了一个测试的“首选项窗格”应用程序,该应用程序使用用户名和密码,对密码执行sha256哈希,然后将其发布到URL,例如: https://development.private/app.php?username = cleartext&password = sha256hash-我们的应用程序正确响应,然后“首选项窗格”应用程序通过进一步的POSTS调用(例如https://development.private/app.php?option1 = enable&option2 = something)推送所有启用/禁用的选项

So the questions are: What is the best way to authenticate the user to our online services? 因此,问题是:对用户进行在线服务身份验证的最佳方法是什么? Should we be sending some type of hash token from our web app to the Preference Pane application? 我们是否应该从Web应用程序向“首选项窗格”应用程序发送某种类型的哈希令牌? and is performing HTTPS POSTS between the two applications the best way to handle this type of communication? 并且在两个应用程序之间执行HTTPS POSTS是处理此类通信的最佳方法吗?

是的,可以将Web应用程序中的令牌发送回首选窗格,即使用sessions ,但是考虑到无论如何您都在使用安全连接,我不会打扰,只需将用户的凭据与每个请求一起发送,在POST数据中(app.php?user = ...&password = ...&data = ...),或者更好的是在请求标头中(请参见http://en.wikipedia.org/wiki/Digest_access_authentication ) 。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM