使用 JAVA 和使用 Appcelerator 的 iPhone 应用程序保护 REST

发布于 2024-10-07 20:55:04 字数 344 浏览 0 评论 0原文

我使用 spring 开发了一个测试 RESTFUL webservice,它返回测试 json 数据。并且使用 Titanium Appcelerator 开发了一个 iPhone 应用程序。

我能够使用来自 iPhone 的 POST 请求有效地与服务进行通信。

问题是我如何进行身份验证用户每次从 iPhone 调用某些 API 时,

我是否应该为每个 API 调用发送用户名和密码,如果是,我如何安全地发送它,目前使用 POST , POST 足够安全。

或者我是否必须加密用户名和密码并在 POST 上发送如果可以的话,可以考虑的顶级安全算法是什么...

任何其他方法将不胜感激...

i have developed a test RESTFUL webservice using spring that returns test json data., and an iPhone App using Titanium Appcelerator.,

i was able to communicate with the Service effectively using POST requests from iPhone.,,

the problem is that how do i authenticate the user every time they call some API from iPhone.,

should i send Username and Password for every API call , if so how do i send it securely, currently using POST , is POST secure enough.

or do i have to encrypt the username and password and send it on POST if so what are the top secure algorithms that can be considered...

any other methods will be appreciated...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满身野味 2024-10-14 20:55:04

最好的方法是通过 HTTP basic 和 SSL 保护 REST 调用。在 Java 中(当您使用 Spring 时),您可以简单地使用 Spring Security。

The best way is secure REST calls by HTTP basic and SSL. In Java (as you're using Spring) you can simply use Spring Security.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文