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 "User-Validation Support" and "Opening a Process", in Chapters 2 and 3, respectively, of the JADE Object Manager Guide.)

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 signOnUserCode or userCode property of the Process class instance, you do not need to code a method that provides the ability to change user codes.

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.

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.