科尔多瓦Access数据库 [英] Access database in Cordova

查看:253
本文介绍了科尔多瓦Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很新的发展科尔多瓦。我想开发Android应用一个登录页面,我需要从数据库中获取的用户名和密码,检查凭证。现在我承载一个Web服务,只是通过用户名和密码,使用Ajax请求的服务,并继续根据从Web服务返回的值。我不知道这是正确的程序?我通过AJAX邮寄的用户名和密码,我认为它insecure.Can请你建议在科尔多瓦访问数据库的最佳WASY?我使用的Visual Studio IDE开发。我用下面的code可以发送用户名和pwd到web服务。

  $。阿贾克斯({
    网址:本地主机\\服务\\控制器',// hostedd在IIS
    数据:JSON.stringify({用户名:USER1',密码:'PWD'}),
    sucess:功能(数据){
        //用于登录成功执行操作
    },
    错误:函数(){    }
})

感谢


解决方案

请按照下列步骤操作:


  1. 如果您使用外部URL,然后白听他们:
    http://cordova.apache.org/docs/en /dev/guide/appdev/whitelist/index.html


  2. 使用HTTPS仅


  3. 通过使用这个插件验证证书的足迹:


http://plugreg.com/plugin/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin

<醇开始=4>
  • 不要发送密码,发送密码的哈希值。使用您在后端用于创建哈希算法相同。


  • 创建设备UUID,将其保存在设备上,并将其发送给后端,并保存它的第一次,称为后端设备。使用此UUID来记录设备的活动。


  • 在每个请求到后端,发送设备UUID,并检查它。


  • 确认,你有在后端的方式来停止设备和用户的活动。


  • 在我的一些应用程序,我用个人的加密设备UUID。


  • 如果你愿意,你可以使用这个插件加密你的整个应用程序:


  • http://plugreg.com/plugin/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin

    <醇开始=10>
  • 在我的一些应用(B2B应用程序),我使用的是通过QR code工作授权。在后台创建个别«安全相关信息»,并显示他们作为一个QR code。在应用程序,你有一个酒吧codescanner该扫描信息,然后保存在设备上。伟大工程,这是有设备上的各个按键的好方法。

  • I am very new to cordova developing. I am trying to develop one login page in android app, i need to access username and password from database for checking credential. Now i am hosting one web service and just pass the user name and password to that service using ajax request and proceed based on value returned from webservice. I dont know is this the correct procedure?. I am sending user name and password through ajax post, i think its insecure.Can you please suggest the best wasy to access database in cordova? I am using visual studio IDE for developing. I used following code to send username and pwd to webservice.

    $.ajax({
        url: 'localhost\service\Controller',// hostedd in iis
        data: JSON.stringify({ username: 'user1', password: 'pwd' }),
        sucess: function (data) {
            //perform operation for login success
        },
        error: function () {
    
        }
    })
    

    Thanks

    解决方案

    Follow these steps:

    1. If you use external urls, then white listen them: http://cordova.apache.org/docs/en/dev/guide/appdev/whitelist/index.html

    2. Use only https.

    3. Verify the footprint of your cert by using this plugin:

    http://plugreg.com/plugin/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin

    1. Don't send the password, send the hash of the password. Use the same algorithm which you use in the backend for creating the hash.

    2. Create a device UUID, save it on the device and send it to the backend and save it the first time, the device called the backend. Use this UUID for logging the device activity.

    3. On every request to the backend, send the device UUID and check it.

    4. Make sure, that you have a way in the backend to stop the activity of a device and user.

    5. In some of my apps, I use the device UUID for individual encryption.

    6. If you want, you can encrypt your whole app by using this plugin:

    http://plugreg.com/plugin/EddyVerbruggen/SSLCertificateChecker-PhoneGap-Plugin

    1. In some of my apps (B2B apps), I use an authorization which is working via QR code. In the backend I create some individual «secure Infos» and show them as an QR code. In the app you have a barcodescanner which scans the info , which is then saved on the device. Works great and this is a good way to have individual keys on the devices.

    这篇关于科尔多瓦Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆