将 Android 应用程序连接到服务器?
我正在开发一个 Android 应用程序,它基本上将网站的功能带到了 Android 上。我想做的是允许用户从 android 应用程序注册该网站。我认为我应该使用一项服务,但我想采取预防措施来防止该服务被滥用,即有人充斥着许多虚假帐户。有人有什么建议吗?我应该在应用程序或服务上做什么来防止这种情况发生?我想使用服务器上生成的验证码,但我想避免这种情况。
编辑 -
我需要能够从应用程序创建新用户,所以我担心有人会弄清楚我如何连接到服务器,他们会开始创建许多新用户。我正在考虑通过发布请求来执行此操作,但我不确定是否应该
编辑 -
我只是想到我应该限制来自 IP 地址的请求。手机的 IP 地址是共享的还是都是唯一的?
I am working on an android app that basically brings functionality of a website to android. What I would like to do is to allow a user to sign up to the website from the android app. I think I should a use a service but I would like to take precautions to prevent the service from being abused, i.e. someone flooding with many fake accounts. Does anyone have any suggestions? What should I do on the app or on the service to prevent this? I though about using a captcha generated on the server but I would like to avoid that.
Edit--
I need to be able to create new user from the app, so I'm worried someone will figure out how I connect to the server and they will just start creating many new users. I am thinking on doing this with a post request but i am not sure if I should
Edit--
It just came to my mind that I should limit the requests coming from an IP address. Do cellphones share IP addresses or are they all unique?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在移动应用程序中使用 WebView,通过此您无需担心身份验证,因为您已经在 Web 应用程序中进行了身份验证。
You can use a WebView inside your mobile application, through this you don't need to get worried about authentication as you are already doing it in your web application.