Create a User Login Window

Home / FactoryTalk Optix / Security

Description
This video demonstrates how to create a new “”Window” in FactoryTalk Optix Studio. Add the Login Form Widget to the user login window. Then configure the Native and/or Web Presentation Engines to use this user login window.

FactoryTalk Optix provides the capability of creating local users and groups and/or using Windows domain accounts. When developing a project, designers can use the Template Libraries to quickly and easily add pre-built login and user management functionality.


Transcript
(00:01) in this video I would like to show a different kind of method of using the login form in a previous video I showed the basics of just you know getting the login form out of the template library and then just placing it on a screen and um this was the the project from that previous video and I had a basically had created a screen called user login you go to the user login tab up here and we can choose our user either user one 2 or three I’d create it log in um and that was basically it um and just as a quick
(00:37) refresher for that um you can come to the template library and type in login and the login form shows up right here um it’s under widgets login form you basically take the login form and you drag it into um into the uh project View Place it under the UI folder somewhere and then basically you can use the login form um widget on on a on a screen um but what if we wanted to basically use a login window instead of creating a screen so what I mean by that is if you come up here to the native presentation engine uh Andor the web presentation engine um
(01:30) when we come to the properties we see that there is a login window option here right so the start window is uh defaults of the main window but there’s this login window and if you try to put the screen that we created over here the user login screen if you try to put that in here it it doesn’t work it it it gives you an error because it has to be what’s known as a window window so by default when you first create a Optics project the main window is created and this is basically um the main window the main container that holds all of your
(02:15) screens panels um dialogue boxes that pop up all that you know are are basically inside that main window you can create new or new windows so if you come to the UI folder and right click and say new and containers there is an option for a window so we’re going to go ahead and choose window and then uh it’s called window one I’m going to call it um I’m just going to give it a name of login window and I’m going to take it and just drag it and move it up here kind of underneath the main window just to kind of keep things organized now uh um to
(03:01) just to come to the main window we can see that our our um properties are 1024 by 720 if I click on the login window we see that it’s 400 by 400 so I’m going to go ahead and make it match the same properties as the uh main window if I double click on the login window it just basically opens up a a kind of a blank canvas so again a window is essentially the main container that will hold the various screens panels um you know and Etc that you that you create in your application so what we’re going to do is um just basically I’m going to put that
(03:51) login uh form right here on this login window and to do that um I’m going to uh come to the uh user login screen and I’m just going to copy go and just copy the the the login form I already had a a login form created and it’s already configured to my users folder so if I just go ahead and copy that and come back to my login window I’m just going to say paste and then that just just puts the login form so basically I have login form 2 and it’s already set up to my um users folder now I could put some other stuff
(04:41) on this window if I wanted to but I’m just going to leave it at this so now we have a login window created with the login form on it if I come back here to my native presentation engine I can now choose from the pull down menu I have the op option to choose either login window or main window so I’m going to choose login window just to show that um I also have a web presentation engine added to this project and I’m going to go ahead and do the same thing I’m going to say uh choose the login window as well so basically now all I got to do is start
(05:24) up the emulator and the difference between what we had before what we had before was basically the project started and then you had to go to the user login tab what happens now is once the emulator starts up it forces the user or the operator to the login screen so it brought you right to the login window and you have to basically log in before you can get any further and into the into the um in into the uh application so just going to enter are the password that I had created for user one and now we’re in since I did say we had a web
(06:07) presentation engine I wanted to show that if I go to Chrome and if I type in my local host 8080 which is basically the address um for this uh for this U Optics application um uh basically did the same thing brought me to the to the login window and forces me to log in so uh maybe perhaps I’ll log in as user 2 and we can see now we’re logged in to the web session as user 2 and how we know that is uh basically oven one uh two is available whereas when we were logged in here in the native um engine uh we were logged in user one and
(07:00) we have access to user one but not to user two and we also have access to open three so we just had some different privileges based on if you’re a user one two or three essentially so essentially we can um you know uh Force the user to have to log in before even accessing the the application by using a uh by creating a new window and putting the login on that