简体   繁体   English

与外部服务器的PhoneGap通信

[英]PhoneGap communication with external server

I am developing a number of pet projects with PhoneGap and I was interested as to if anyone could recommend the best way to securely send data from the app to a server, and vice versa. 我正在用PhoneGap开发许多宠物项目,并且我对是否有人可以推荐将数据从应用程序安全发送到服务器,以及反之亦然的最佳方法感兴趣。

I'm logging the user in with Facebook, with their access_token in localStorage so it will persist, but I'm going to need to hit the server to create a profile, collect data to display in-app, etc.. 我正在使用Facebook登录用户,并将他们的access_token放置在localStorage中,这样它将继续存在,但是我将需要点击服务器来创建配置文件,收集数据以在应用程序中显示等。

I have considered a JSON service that auth's against an encrypted Facebook UID, or a digest auth based REST service. 我考虑过针对加密的Facebook UID进行身份验证的JSON服务,或基于摘要身份验证的REST服务。 Any ideas on what the "proper" way to do this would be? 关于实现此目标的“正确”方式有什么想法?

Have you considered using SSL, I find its way less hassle that trying to hash something yourself. 您是否考虑过使用SSL,我发现它比尝试自己哈希某些东西更省事。 If you are not using SSL you can't prevent a man in the middle attack...maybe im wrong here, or lazy, probably both... 如果您不使用SSL,则无法阻止中间人发动攻击……在这里可能是我错了,或者是懒惰了,可能两者都在...

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

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