Page 1 of 1
Login PopUp - how to allow remembering login values ?
Posted: Mon Apr 10, 2017 8:54 pm
by Jiri
VL-web application uses a simple login POP-UP window for entering required User name and Password.
The authentication logic in using application file (containing profiles and encrypted passwords) and server module for authentication.
It works fine, but customer is wondering, why this login cannot be remembered in browser.
Typically, the browser offers option to save (and remember) logins for specific servers, but this option is not offered for LANSA application login.
What can we do for it ?
Re: Login PopUp - how to allow remembering login values ?
Posted: Tue Apr 11, 2017 9:47 am
by BrendanB
Typically, most browsers look for input fields with the labels:
<input type='text' name='username'>
<input type='password' name='password'>
I have had some success by naming the fields on my login form 'username' and 'password'.
I think you will have to ensure that you have (at least) 2 input boxes, 1 labelled 'username' (#username in lansa) and 1 labelled 'password' (#password in lansa). you should ensure that the password input has the password_char is set.
something like:
Code: Select all
Define_Com Class(#PRIM_LABL) Name(#Label1) Displayposition(2) Ellipses(Word) Height(35) Left(15) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Verticalalignment(Bottom) Width(998) Caption('Email Address') Themedrawstyle('Strong') Top(70)
Define_Com Class(#PRIM_EDIT) Name(#userName) Displayposition(3) Left(15) Parent(#COM_OWNER) Showselection(False) Showselectionhilight(False) Tabposition(1) Top(105) Width(998) Height(35) Placeholder('name@example.com')
Define_Com Class(#PRIM_LABL) Name(#Label2) Caption('Password') Displayposition(4) Ellipses(Word) Height(35) Left(15) Parent(#COM_OWNER) Tabposition(5) Tabstop(False) Verticalalignment(Bottom) Width(998) Themedrawstyle('Strong') Top(140)
Define_Com Class(#PRIM_EDIT) Name(#Password) Displayposition(5) Left(15) Parent(#COM_OWNER) Showselection(False) Showselectionhilight(False) Tabposition(2) Top(175) Width(998) Height(35) Placeholder('Password') Passwordchar('*')
Re: Login PopUp - how to allow remembering login values ?
Posted: Tue Apr 11, 2017 11:26 am
by soa
You could code behavior yourself by storing the credentials encrypted in local storage on successful logon.
Re: Login PopUp - how to allow remembering login values ?
Posted: Wed Apr 12, 2017 1:13 am
by Jiri
Does not work for me
Can you provide any functional example ? Either the login as requested or a possibility to store login localy?
Re: Login PopUp - how to allow remembering login values ?
Posted: Wed Apr 12, 2017 9:41 am
by Stewart Marshall
Hi Jiri
Have a look at xDemoWebLocalStorage
This demonstrates the use of LocalStorage
Regards
Re: Login PopUp - how to allow remembering login values ?
Posted: Wed Apr 12, 2017 6:54 pm
by Jiri
Thanks Steward, it is good and simple example