?
Solved

WAP login  "easy way"

Posted on 2005-04-26
6
Medium Priority
?
1,825 Views
Last Modified: 2013-12-27
Hello I have played little bit with a wml using wml editor 3.0 and testing it with openwave mobile simulator.
What is the most easy way to implement login support. It means that I want to ask user for ID and password on the first wml card and when it is correct, application should jump to card 2.???? can anyone help me... Thanks
0
Comment
Question by:mirzaabdic
  • 3
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
cwkhang earned 500 total points
ID: 13891595
if you need to make use of database (id and password store in database), u need to use web language like asp, php, jsp.
if you don't need any database, tat can be implemented with the help of wmlscript.
0
 

Author Comment

by:mirzaabdic
ID: 13892555
Hello cwkhang

Yes i dont need any database implementation. wmlscript is ok....any idea how to do that....????
thanks in advance
0
 
LVL 6

Expert Comment

by:cwkhang
ID: 13893992
u need this two files - signin.wml and validate.wmls
valid userid is abcd and valid password is 123
hope these are useful for you. gd luck!

signin.wml
=======

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM/DTD WML 1.2//EN"
"http://www.wapforum.org/DTD/wml12.dtd">

<wml>

<card id="login" title="Login">
<p>
Username:
<do type="accept">
<go href="#pass"/>
</do>
<input name="login"/>
</p>
</card>
<card id="pass">

<p>
Password:
<do type="accept">
<go href="validate.wmls#validate()"/>
</do>
<input type="password" name="pass" />
</p>
</card>
<card id="empty">
<p>Username or Password is empty!</p>
<do type="accept">
<go href="#login"/>
</do>
</card>

<card id="badlogin">
<p>Authentication failed!</p>
<do type="accept">
<go href="#login"/>
</do>
</card>

<card id="Ok" title="New Page">
<p>
Welcome $(login)!
</p>
</card>
</wml>



validate.wmls
=========

extern function validate()
{
var login=WMLBrowser.getVar("login");
var pass=WMLBrowser.getVar("pass");
var tempid="abcd";
var temppwd="123";

var compid=String.compare(login,tempid);
var comppwd=String.compare(pass, temppwd);

if ((String.isEmpty(login))||(String.isEmpty(pass))) {
WMLBrowser.go("signin.wml#empty");
}
else if ((comppwd!=0)||(compid!=0)){
WMLBrowser.go("signin.wml#badlogin");
}
else {
WMLBrowser.go("signin.wml#Ok");
}
}
0
What Security Threats Are We Predicting for 2018?

Cryptocurrency, IoT botnets, MFA, and more! Hackers are already planning their next big attacks for 2018. Learn what you might face, and how to defend against it with our 2018 security predictions.

 

Author Comment

by:mirzaabdic
ID: 13907635
Thanks...   my WML files are running on tomcat server in root. And they are working.
But i have a last Q. Thsi 2 files u provided do they just have to be in the same root directory and they will work????
0
 

Author Comment

by:mirzaabdic
ID: 13908632
Thanks a lot it is working afte I changed a little bit in my MIME types on tomcat server...
U rule
0
 

Expert Comment

by:touchring
ID: 14760626
Why dun you consider letting the user send a login SMS to the server, and then WAP Push the login link to the request MSISDN?  

This is by far the most secure method and also the most convenient to the end user.

Rgds,
Joshua Lim
Visualtron Software
http://www.sms-gateway-software.com
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe how to setup a Cisco WLC 5508 to work with Apple's Bonjour protocol across VLANs.  I will also discuss using screen mirroring and Airplay on an AppleTV v3.  This article covers the wireless network only and requires m…
This subject  of securing wireless devices conjures up visions of your PC or mobile phone connecting to the Internet through some hotspot at Starbucks. But it is so much more than that. Let’s look at the facts: devices#sthash.eoFY7dic.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Suggested Courses
Course of the Month17 days, 6 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question