如何实现使用jQuery Mobile,PhoneGap和Django实现的移动Web应用程序的首次登录方案? [英] How to implement a first-time-only login scheme for a mobile web application implemented with jQuery Mobile, PhoneGap, and Django?

查看:146
本文介绍了如何实现使用jQuery Mobile,PhoneGap和Django实现的移动Web应用程序的首次登录方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 jQuery Mobile 开发移动网络应用程序的早期(预编码)阶段(我们看过在 Sencha Touch 几个星期,但jQuery Mobile更适合我们团队的能力)。我使用 PhoneGap 包装jQuery Mobile网络应用程序,以创建iPhone,iPod touch和iPad本机应用程序。我为我们的web应用程序使用Django,所以打算在服务器端使用Django,为移动应用程序和服务器之间的接口提供某种JSON / Ajax / REST数据流。由于它是仅适用于移动设备的应用,因此我们应该可以访问所有 HTML5 类型的内容。

I'm in early (pre-coding) stages of developing a mobile web application using jQuery Mobile (we looked at Sencha Touch for a few weeks, but jQuery Mobile is a better fit for our team's competencies). I am wrapping the jQuery Mobile web application with PhoneGap to create an iPhone, iPod touch, and iPad native-ish application. I use Django for our web applications so intend to do the same here for the server-side, with some sort of JSON/Ajax/REST data flow for the interface between the mobile application and the server. Since it's a mobile-only application, we should have access to all the HTML5 kind of stuff.

虽然我很可能会为此实施提出其他问题/问题,但这里是我目前的问题/问题:

While I am likely to come up with other issues/questions for this implementation, here is my current question/issue:

我需要设置应用程序,以便第一次用户打开应用程序时,他们必须输入用户名和密码进行身份验证。随后,用户不必进行认证,除非用户点击设置链接,该链接为用户提供了使用不同帐户或密码进行身份验证的页面。应用程序每次启动时仍应使用最初输入的当前用户名和密码对服务器进行身份验证,以确保该帐户未被禁用或密码已更改或某事。

I need to set up the application so that the first time the user opens the application, they must enter a username and password to authenticate. Subsequently the user should not have to authenticate unless the user clicks a "settings" link which gives them a page to authenticate with a different account or password. The application should still authenticate to the server each time it is started, using the current username and password that was originally entered, to make sure that the account hasn't been disabled or the password changed or something.

我对认证方案很新。我应该怎么办?

I am pretty new to authentication schemes. What should I do?

推荐答案

我建议不要存储在HTML5本地/网络存储。如果你的目标是iOS PhoneGap,我建议使用Keychain插件:
http://blogs.nitobi.com/shazron/2010/11/06/ios-keychain-plugin-for-phonegap/

I would advise against storing in HTML5 local/web storage. If you are targeting iOS PhoneGap, I would recommend using the Keychain Plugin: http://blogs.nitobi.com/shazron/2010/11/06/ios-keychain-plugin-for-phonegap/

这篇关于如何实现使用jQuery Mobile,PhoneGap和Django实现的移动Web应用程序的首次登录方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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