The Application goal is to force the user to change from a default password on the first logon attempt.
The application uses LOCAL Security System and it has 3 users: userA, userB and userC. All of them have the default password 123 and were created using the function CreateUser() previously.
Whenever you try to LOGON() with any of those users, the application will search for the user in a file users.txt (located on the web directory) for that user. If the user is not in the file, it means that its the first attempt and it will popup a screen so the user is able to change the current password.
Whenever the user types the new password and hit ok, the name of the user is saved on the users.txt file, and the user is logged on to the application. If the user tries to log again, as it is already in the users.txt file, the firstAttempt will return false, and will log the user direclty without the need for a new password.
To make the application work using a Secure Viewer or Web Thin Client, the path needs to be a network path (file sharing). And you'll need to share your application folder and give it access for the users to read/write the users.txt file. (Check Startup script to set the Server IP Address, and networkPath to be used);
Remember that this is only a sample and if you want to collaborate with more functions to the app, and/or update for a better security scenario or any improvements you're very much WELCOME! Please post your comments, improve the app, and share!!!!