4.1 Types of Variables

SecureLogin supports the use of four different types of variables:

  • Stored

  • Runtime

  • Directory attribute

4.1.1 Using a variable to change the default platform

NOTE:Specify variables without spaces, for example $Username_Alias. If you use spaces you must enclose the entire variable in quotation marks, for example "$Username Alias".

Each variable defaults to the platform specified in the application definition or the predefined application name. You can use a variable to change the platform.

Example:

If you have applications A and Z.

  1. Application A has default credential A, and linked credentials B and C. A credential selection will prompt you to choose A, B or C.

  2. Application Z has default credential Z with linked credentials W, X and Y If you have set the platform to Z and then a credential selection will prompt you to choose W, X, Y or Z.

$password: This variable will prompt the user for a credential. For application A a credential selection will prompt you to choose A, B or C and for application Z a credential selection will prompt you to choose W, X, Y or Z.

$password(A): This variable will not give any choice and will use the credential from A.

$password(Z): This variable will not give any choice and will use the credential from Z.

4.1.2 Directory Attribute Variables

SecureLogin can read directory attributes from the currently logged on user's object. For example, %CN reads the CN attribute from the currently logged in user's object and displays it.

IMPORTANT:SecureLogin can read and display an attribute only if the attribute is defined in the user object. If the attribute variable is not defined, SecureLogin will display an empty attribute.

You can use the percentage symbol (%) variables only when SecureLogin is configured to use a directory and only on single-valued text attributes.

Quotes are required around the variable if the attribute name contains a space. For example:

Set ?text "%fullname"
MessageBox "%mail"

For more information about application definition elements and symbol usage refer to Section 3.0, Managing Application Definitions.

4.1.3 Stored Variables

Stored variables are the most common style of variable used in application definitions and Predefined Applications. They are preceded with a dollar symbol ($). Use these variables to store the values used during the login process, such as usernames, passwords and any other details that are required.

This section contains the following information:

Storing the Variables

The values of these variables are stored in the directory under the user object. They are encrypted so that only the user can access them. You can store variables separately for each application definition and predefined application, so the username variable for one application can be different from the username variable for another application. It is, however, possible to set an application to read variables from another application's application definition and predefined application. This is useful for applications that share user accounts or passwords.

For more information, see Section 6.2.81, SetPlat.

Using Stored Variables

If a stored variable is referenced in an application definition and predefined application, and there is no value stored for that variable (for example, the first time the program is run), SecureLogin prompts the user to enter a value for the variable. This is an automatic process. It is also possible to manually trigger this process to prompt a user to enter new values for particular variables.

For more information, see Section 6.2.22, DisplayVariables and Section 6.2.9, ChangePassword.

NOTE:If you want to hide a variable from an administrator by displaying it as asterix (****) instead of clear text, begin the variable name with $Password. For example, the $PasswordPIN variable is protected as described, however, $PIN is not.

Example of stored variables in use:

Dialog
Class #32770
Title "Log on"
EndDialog
Type $Username #1001
Type $Password #1002
Click #1

4.1.4 Runtime Variables

Runtime variables are generally used for storage of calculations, processing data, and date information. You can also use them for temporary passwords and usernames.

Runtime variables are preceded by the question mark symbol (?). They have two modes:

  • Normal runtime variables are reset each time SecureLogin is started.

  • Local runtime variables are reset each time the application definition and predefined application is started.

Runtime variables are Normal by default. For more information about how to switch a runtime variable to Local mode, see Section 6.2.46, Local.

Using Runtime Variables

Runtime variables are not stored in the directory or the SecureLogin cache; they are used straight from the computer's memory. For this reason, it is important not to use runtime variables for the storage of usernames, passwords, or other details SecureLogin will need to access in the future.

If runtime variables are used for such details, the user is prompted to enter them each time the application definition or predefined application is run, or each time SecureLogin is restarted. Users are not prompted for ?variables that have no value. These variables are given the value <NOTSET>.

Example of a Runtime Variable

Dialog
Class #32770
Title "ERROR"
EndDialog
Local?ErrorCount
Increment?ErrorCount
If?ErrorCount Eq "2"
MessageBox "This is the second time you have received this error. Would you like to reset the application?" -YesNo ?Result
If ?Result Eq "Yes"
       "App.exe"
      Run "C:\App\App.exe"
Else
      Set?ErrorCount "0"
   EndIf
EndIf