IBM Worklight中的登录认证 [英] Login Authentication In IBM Worklight

查看:81
本文介绍了IBM Worklight中的登录认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jquery Mobile从IBM Worklight项目开始.我已经创建了一个登录页面.每当用户单击提交"按钮时,我也需要运行该功能以检查数据库中的用户名和密码.

I am using Jquery Mobile to start with IBM worklight project. I have created a Login Page. Whenever user click on the submit button I need the function too run to check for the username and password in the Database.

数据库->我正在使用MY SQl数据库.使用命令客户端,我添加了表,用户名密码和值.每当用户单击提交"按钮时,我都需要检查该表. IBM worklight教程说我需要将JDBC jar文件添加到服务器/库.我已经将下载的文件复制粘贴到了同一文件夹中.

Database -> I am using MY SQl database. Using the command client I have added the tables, username Password and values. I need to check this table whenever user clicks on the submit button. IBM worklight tutorial says I need to add the JDBC jar file to server/lib. I have copy pasted the downloaded file on the same folder.

我不知道我是否需要创建自己的自定义登录模块,或者是否可以使用默认设置.

I don`t know whether I need to make my own Custom login Module or default thing is available.

在IBM网站上没有用于Authentication的明确示例.请帮助我.

There Isn`t a clear examples available in the IBM website for the Authentication. Please help me with this.

推荐答案

我建议阅读以下内容:

  • 身份验证概念
  • 基于适配器的身份验证+练习和代码示例
  • 适配器框架概述
  • SQL适配器–与SQL数据库通信+练习和代码示例

入门页面中.另请参见信息中心如果您需要更多文档.

from the Getting Started page. Also take a look at InfoCenter if you need more documentation.

从基于适配器的身份验证代码示例中,您可以通过替换以下内容开始

From the adapter-based auth code sample, you can start by replacing:

if(username == "worklight" && password == "worklight"),并调用您的后端(请参阅sql适配器代码示例),以检查用户名和密码是否有效.

if(username == "worklight" && password == "worklight") with a call to your backend (see sql adapter code sample) that checks if the username and password are valid.

这篇关于IBM Worklight中的登录认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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