Page 1 of 1

Login User with only password

Posted: Tue May 28, 2019 3:33 am
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

Re: Login User with only password

Posted: Tue May 28, 2019 1:15 pm
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.

Re: Login User with only password

Posted: Tue May 28, 2019 11:23 pm
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

Re: Login User with only password

Posted: Wed May 29, 2019 6:46 am
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);

Re: Login User with only password

Posted: Wed May 29, 2019 7:38 am
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

Re: Login User with only password

Posted: Wed May 29, 2019 9:26 am
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);

Re: Login User with only password

Posted: Wed Jul 31, 2019 5:06 am
by BeeJee
Hi,

Sorry for the late reply.

Hereby the program I have made.

Thanks for the help.

kind regards,

Re: Login User with only password

Posted: Thu Aug 01, 2019 1:40 am
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