CommandFusion Wiki

Documentation Resources

User Tools

Site Tools


software:modules-and-examples:password-protection-demo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

software:modules-and-examples:password-protection-demo [2013/08/01 14:44]
jarrod
software:modules-and-examples:password-protection-demo [2013/08/07 03:45] (current)
jarrod [Step One - Set the Serial Join]
Line 1: Line 1:
-====== Password Protection ​Example ​======+====== Password ​Lock/Protection ​Module ​======
  
-Customers often ask for a way to password protect their system ​so that if the iPhone is lostno one can walk up to their house and use it.\\ +Customers often ask for a way to password protect their system ​for many different reasons. It may be that you want some security in case you lose your phoneor that you simply want to lockout access to certain areas of your interface. 
-Of course ​the chances ​of this happening are slim to none, but none-the-less, here is a way to do it that will work with ANY system.+ 
 +We have developed a module ​and demo project to help achieve this in your GUI. 
 + 
 +===== Password Lock Module ===== 
 + 
 +{{url>​http://​www.youtube.com/​embed/​rgg8UtLFt8o 560px,315px noscroll noborder alignment|Password Lock iViewer Module}} 
 + 
 +We are going to have a quick look at how to implement some basic password protection to your GUI. This is done using our new password lock JavaScript module.  
 + 
 +This module adds a simple password validation to block entry to a page.  
 + 
 +You could use this to block access to any part of a GUI you design in guiDesigner. It might be to block access to CCTV feeds or alarm system controls. In our demonstration,​ we are using this functionality to lockout access to parental controls
 + 
 +{{:​software:​modules-and-examples:​startup_portrait.png?​direct&​300|}} {{:​software:​modules-and-examples:​welcome_portrait.png?​direct&​300|}} 
 + 
 +==== Download ==== 
 +[[https://​github.com/​CommandFusion/​DemoUserInterfaces/​raw/​master/​PasswordLock/​passwordlock.gui.zip|Download the Module]]. 
 +==== Step 1 - Set the Serial Join ==== 
 +Open up the ''​PassLock.js''​ file and edit the (2) serial join so it is the same as the (3)serial join of the (1)text object of where the entered code will be shown (Where the asterisks show up in the video). By default it is set to ''​s1''​. 
 + 
 +{{:​software:​modules-and-examples:​serial_join.png?​nolink|}} 
 + 
 +==== Step 2 - Add Script ==== 
 +Add the ''​PassLock.js''​ script to your project via the [[software:​gui-designer:​script-manager|Script Manager]]. 
 + 
 +==== Step 3 - Global Tokens ==== 
 +Open the Global Token Manager by right clicking on your gui file in the [[software:​gui-designer:​project-tree|project tree]] and selecting ''​Global Token Manager''​  
 + 
 +{{:​software:​modules-and-examples:​global_token_manager_select.png?​nolink|}} 
 + 
 +Edit the two available global tokens: 
 +  * Password: The is the password that must be entered correctly to activate the page flip 
 +  * PassSuccessPage:​ This is the page that the GUI will flip to when the password is entered correctly 
 + 
 +==== Step 4 - Configure Buttons ==== 
 +In our demo project the buttons are already there and are configured for you. If you want to make your own keypad - you will need to tell the module which button is which. This is done by entering ​JavaScript action in the button properties. 
 + 
 +{{:​software:​modules-and-examples:​button_config.png?​nolink|}} 
 + 
 +So if the button has a JavaScript action of ''​PassLock.keyPress(5);''​ then that means that this button is the number 5. You will need to do this for all the number 0-9. 
 + 
 +The only other call that you have the configure is ''​PassLock.clear();''​. This clears any numbers already entered. 
 + 
 +GitHub 
 +For the most up to date version of this module, you can visit our [[https://​github.com/​CommandFusion/​DemoUserInterfaces/​tree/​master/​PasswordLock|Demo User Interfaces repo on GitHub]].
  
-===== Demo Project ===== 
-  * [[https://​github.com/​CommandFusion/​DemoUserInterfaces/​tree/​master/​PasswordLock]] 
-  * View the readme at the above link to learn more. 
-  * Grab the zip file from the above link to see how it works. 
  
 ====== Another Approach ====== ====== Another Approach ======
software/modules-and-examples/password-protection-demo.txt · Last modified: 2013/08/07 03:45 by jarrod