Select to view content in your preferred language

Putting a login screen onto sample flex viewer?

4838
23
05-04-2010 01:47 AM
grahamcooke
Regular Contributor
Has anyone successfully put a login system "in front" of the sample flex viewer? Can this be done using states in flex? If anyone can help me out I'd be most grateful!!
Tags (2)
0 Kudos
23 Replies
RobertScheitlin__GISP
MVP Emeritus
gcooke76,

   Sure look here at this thread.

http://forums.arcgis.com/threads/3505-Login-Page-The-connect-to-LDAP
0 Kudos
grahamcooke
Regular Contributor
Thanks. Any code samples anywhere for this please? I'm really struggling to get my head round flex at the moment (coming from a .net background)
0 Kudos
seanlo
by
Emerging Contributor
Yeah just use PopUpManager like so:

  LoginPop = new Panel();
         LoginPop.title="Please Login";
            LoginPop.width=600;
         LoginPop.height=500;   
  LoginPop.addChild(LoginModule);
  LoginModule.loadModule("Login.swf");
            PopUpManager.addPopUp(LoginPop,this,true);
  PopUpManager.centerPopUp(LoginPop); 

Dump it in the application from the function: creationComplete = "LoginVerify()"
Whereby LoginVerify() is the code above.

Of course.. if you actually want it to use the token service or login screen that's a different step.
0 Kudos
Drew
by
Frequent Contributor
Depending on your audience you might want to just use IIS and Windows Authentication and protect the entire directory.

You will have to map all the files to go through C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll but that can easily be done using 'wild card application maps' in IIS.

That's how I do it for a lot of internal applications.

Drew
0 Kudos
grahamcooke
Regular Contributor
Yeah just use PopUpManager like so:

  LoginPop = new Panel();
         LoginPop.title="Please Login";
            LoginPop.width=600;
         LoginPop.height=500;   
  LoginPop.addChild(LoginModule);
  LoginModule.loadModule("Login.swf");
            PopUpManager.addPopUp(LoginPop,this,true);
  PopUpManager.centerPopUp(LoginPop); 

Dump it in the application from the function: creationComplete = "LoginVerify()"
Whereby LoginVerify() is the code above.

Of course.. if you actually want it to use the token service or login screen that's a different step.


so login.swf is a separate app that i create in flex?
0 Kudos
grahamcooke
Regular Contributor
Depending on your audience you might want to just use IIS and Windows Authentication and protect the entire directory.

You will have to map all the files to go through C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll but that can easily be done using 'wild card application maps' in IIS.

That's how I do it for a lot of internal applications.

Drew


this would have been ideal, but some of the users of our system will be people who are using pc's connected to our network but they will NOT have active directory accounts. We need to create separate dbtables to hold their login credentials and then depending what area of the UK they are "allocated" to, load a combo box with training areas to choose from to create their base map data.
0 Kudos
grahamcooke
Regular Contributor
OK i've been thinking some more about this and was wondering if this might be the right way to go:

As the app is fairly complex and there would be an admin screen for our helpdesk people to do user related studd like unlock/change password/create new user etc... would it be a good idea to create a .NET website and use the membership provider to handle all the user related stuff. All validation could be done in ASP.NET and then on successful login i could redirect to an asp.net that "hosts" the flex app?

Is this a horrible idea or something that is workable? .net is much more in my comfort zone to be honest. Obviously all the mapping functionality etc will HAVE to be done in flex and that's fine, I want to learn but it seems that with all the built in functionality .NET has for handling users / roles etc then this could be the way to go?

Would appreciate some expert advice on this please!
0 Kudos
Drew
by
Frequent Contributor
That's the only secure way to go. Using Flex as your login screen / validation could be very dangerous from a security stand point.

I would still look at locking down the entire DIR some how to protect direct access to the .swf file through a URL.


Drew
0 Kudos
grahamcooke
Regular Contributor
That's the only secure way to go. Using Flex as your login screen / validation could be very dangerous from a security stand point.

I would still look at locking down the entire DIR some how to protect direct access to the .swf file through a URL.


Drew


thanks, I think I'm decided on this approach! As for locking down the page that hosts the swf, I can do this with the role membership provider by placing the page that hosts the swf in a folder that is restricted only to people who have logged in successfully.

cheers.
0 Kudos