Login User with only password

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
BeeJee
Posts: 6
Joined: Tue May 28, 2019 3:21 am

Login User with only password

Post by BeeJee »

Hi,

I'm hitting the problem that ou always want to select the user and then type in the password.
Also in the sample program for custom login I hit this problem.

My customer prefer to just type in the pasword and then login the corresponding user.
Everything is already programmed with username and the normal security settings but I have to transform it now to a custom login now.

Is there something where you can check the password you have typed in is correcponding with the passwords that are registered inside the Security Panel and then login the corresponding user?

kind regards,
Bert

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: Login User with only password

Post by Russ C. »

Unfortunately, you're not able to do a compare on the passwords for users.

However, what I would do is create a password tag and in the security object setup all the user names as "User" plus their password. So "User12345" would have a password as "12345". Then in scripting call the login function and prepend "User" to the password tag for the user name, then if you would like to display the currently logged in user, I would create and reference a Text Library for their actual user names.

I've attached an example project with a password only login feature implemented the way I've described above.
Attachments
LoginPasswordOnly.zip
(36.08 KiB) Downloaded 446 times
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

BeeJee
Posts: 6
Joined: Tue May 28, 2019 3:21 am

Re: Login User with only password

Post by BeeJee »

Hi,

I find this option pretty dangerous because when the login is successfull you get the message userXXXX is logged in. And XXXX is the password.

Is there a possibility to change the password inside the scripting? So my scripting text becomes the master.

Then I can link the password inside my scripting to the user and I only need to type the password on the screen.

kind regards,
Bert

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Login User with only password

Post by AMitchneck »

You can keep the login screen from showing "user ... has logged in" by calling the login function passing it false. The following shows the full login screen (user + password requested), but does not show the user has logged in:

Code: Select all

Globals.Security.Login(false);
The corresponding logout:

Code: Select all

Globals.Security.Logout(false);
Adam M.
Controls Engineer
FlexEnergy

BeeJee
Posts: 6
Joined: Tue May 28, 2019 3:21 am

Re: Login User with only password

Post by BeeJee »

Hi Adam,

But it is annoying that the login screen appears because we don’t use the login screen. We have a custom login with only the numpad. It would be nice if we could block the message and make our own pop-up login OK. Because then I don’t need to select the users. But he goes further if the user doesn’t fit with the password and checks the next user. Without this message “login failed”.

Because I had something like that. When you have the wrong password for the first one and the good one for the second one. He shows first the dialog “login failed”, you confirm it and then you get “login successful”

kind regards,
Bert

User avatar
Russ C.
Posts: 213
Joined: Thu Nov 16, 2017 3:32 pm
Contact:

Re: Login User with only password

Post by Russ C. »

BeeJee wrote:I find this option pretty dangerous because when the login is successfull you get the message userXXXX is logged in. And XXXX is the password.
Yeah, I could see that. And in the instances where I've seen this type of one factor authentication, it was more of a user ID than a password.

So, if you wanted to hide the dialog, you can change this line:

Code: Select all

success = SecurityService.LoginUser(@"User"+Globals.Tags.PasswordTag.Value.String, Globals.Tags.PasswordTag.Value.String);
to:

Code: Select all

success = SecurityService.LoginUser(@"User"+Globals.Tags.PasswordTag.Value.String, Globals.Tags.PasswordTag.Value.String, false);
Best regards,

Russ
(801) 708-6690
Technical Support
Contact Us

Beijer Electronics AB
http://www.beijerelectronics.us

BeeJee
Posts: 6
Joined: Tue May 28, 2019 3:21 am

Re: Login User with only password

Post by BeeJee »

Hi,

Sorry for the late reply.

Hereby the program I have made.

Thanks for the help.

kind regards,
Attachments
CustomLoginScreen_Prop_3.zip
(49.96 KiB) Downloaded 382 times

BeeJee
Posts: 6
Joined: Tue May 28, 2019 3:21 am

Re: Login User with only password

Post by BeeJee »

Hi,

The textfield we now use add * when you type in something. Because we use the numpad.
Is there a possible to have those *** when you use the automatic keyboard?

kind regards,
Bert

Post Reply