You could also store your authentication credentials in a file(xml?) on
the server.

 

The starting place is to choose your back-end platform/language(Java,
php, CF,.net, etc).  Then choose the RPC protocol(RemoteObject,
HTTPService, WebService) you will use between flex and that platform.
Then choose your Flex client UI style( ViewStack, pop-up, etc.)

 

Tracy Spratt 
Lariat Services 

Flex development bandwidth available 

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Wally Kolcz
Sent: Thursday, February 05, 2009 9:53 AM
To: flexcoders@yahoogroups.com
Subject: re: [flexcoders] Re: Login / Password Form

 

I used a database and RemoteObject/Web Services to check a CFC with the
query to see if the username and password matches and returns any info I
need then I have something like this:

public function loginHandler(e:ResultEvent):void {
                userData = e.result as ArrayCollection;
                if (userData.length == 1){
                 //Whatever you want to do.
                }else{
                    username_txt.text = "";
                    password_txt.text = "";
                    Alert.show("Incorrect username and/or password.
Please try again.","Login Error");
                }
                
            }

I hide the login box and show the rest of the app which I have wrapped
in a canvas which visible is set to false.

If you dont want to have a database you could use an Array or Object to
store username and passwords hardcoded and check against them. Or if you
have just one username/password you could just use something like:

public function login(username:String, password:String):void {
                if (username == "someusername" || password =
"somepassword"){
                  //Your code to do whatever you want.
                }else{
                    username_txt.text = "";
                    password_txt.text = "";
                    Alert.show("Incorrect username and/or password.
Please try again.","Login Error");
                }
                
            }

________________________________

From: "valdhor" <valdhorli...@embarqmail.com>
Sent: Thursday, February 05, 2009 6:42 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Login / Password Form

These threads should get you started:

http://www.nabble.com/Login-Registration-Page---tp21747714p21748295.html
<http://www.nabble.com/Login-Registration-Page---tp21747714p21748295.htm
l> 
http://www.nabble.com/flex-login-popup-help-needed-pleaseeeeeeeee-tp2077
2482p20833766.html
<http://www.nabble.com/flex-login-popup-help-needed-pleaseeeeeeeee-tp207
72482p20833766.html> 

HTH

Steve

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "christophe_jacquelin"
<christophe_jacque...@...> wrote:
>
> Hello, 
> 
> I am searching a code source exemple for a classical login / password 
> form in a flex application.
> 
> Did I need absolutely a database to store Passwords ? 
> 
> Thank you, 
> Christophe,
>




 



Reply via email to