getAndValidateUser
getAndValidateUser(usercode: String output; password: String output): Boolean;
The getAndValidateUser primary validation method of the Global class and its associated protocol enables you to provide a customized user logon form and associated validation logic. Your validate method can create forms and it can access and update the database.
Use this method to handle the end-user interaction required to solicit a user code and optional password from the end-user and to perform any primary validation and retry logic.
When you use this method with the isUserValid method, you should return the password in encrypted form.
The isUserValid method (or secondary validation) then becomes a "rubber stamp" action that revalidates the user code and the already encrypted password, preferably at the server. (For details, see "
The getAndValidateUser method must return a user code at a minimum. This user code is passed by the JADE Object Manager to server nodes.
The getAndValidateUser method has no input parameters. The output parameters are listed in the following table.
Parameter | Description |
---|---|
usercode | User-supplied user code |
password | User-supplied password |
As the usercode output parameter is the
The values returned by this method are listed in the following table.
Value | Result |
---|---|
true | The user is authorized |
false | The user is not authorized |
When no user code is supplied in the jomSignOn Application Programming Interface (API) call to open a process, the JADE Object Manager invokes the getAndValidateUser method on the subschema global instance, as follows.
-
If the method indicates success, the jomSignOn API proceeds to secondary validation by using the isUserValid method.
-
If the method signals failure (that is, the user is not authorized), the JADE Object Manager discontinues the tentative application process and a null process handle is returned to the caller. No exception is raised; error handling and reporting are left to your user method.
The default getAndValidateUser method is defined and implemented in the RootSchemaGlobal global class of the Root Schema. The default implementation manufactures a user code that consists of the workstation name that has a suffix of the operating system process ID, and it returns this user code, a null password, and a result of true.
The default method definition also defines the method name and signature so that you are aware that you are correctly reimplementing the method.