用于共享数据库详细信息的 Web 服务


Web service for sharing DB details

我们已经使用codeigniter开发了一个Web应用程序,现在正在计划一个移动客户端(适用于Android手机)。场景是这样的

1)mobile client will have a local db same as server db
2)After installing the app an authentication process is there
3)After authentication we need to download the data from server db to mobile client DB.

我已经使用REST api 创建了一个 Web 服务进行身份验证过程及其工作,但step 3我需要帮助。

我是否可以也使用REST api,或者是否存在任何其他安全机制来同步服务器和移动客户端数据库?

任何人都可以建议!

此致敬意

首先,你需要创建一个与Oauth2兼容的非常强大的结构,我推荐了这个库: Codeigniter RESTserver

之后,您必须知道 Oauth2 协议的工作原理并实现它。

阅读本教程,很旧,但对您的工作有好处:http://code.tutsplus.com/tutorials/working-with-restful-services-in-codeigniter--net-8814