Getting Non-GUI Client Sign-On Details

Although the signonUser and signonPassword command line arguments are optional when executing existing methods or reading, compiling, and executing transient methods, the appropriate authentication rules in the Global::isUserValid method may require them for signing on to the application specified in the app command line argument.

If you do not want to specify the user identifier and password on the command line, you can use the GetSignonAuthDetails parameter in the [NonGuiClient] section of the JADE initialization file to specify your own input DLL. Use this parameter (whose default value of <default> indicates that the signonUser and signonPassword command line arguments are used, and if they are not present, the JadClientTaskUser and JadClientTaskPassword values are used) to specify the name of the input library file and optionally the function name, which defaults to getSignonDetails.

The JADE Application Programming Interface (API) function call interface signature is as follows.

extern "C" int JOMAPI authFunction(GETPASSWORD_UNION * authInfo);

This function call, whose use is shown in the following example (in which you would substitute your own user code and password to replace the fictitious ones used in this example), returns zero (0) for success or a non‑zero error condition if the call was unable to obtain the password.

extern "C" int JOMAPI
authFunction(GETPASSWORD_UNION * authInfo)
{
    authInfo->GETPASSWORD_STRUCTv2.bValid = true;

    intlStrcpy(authInfo->GETPASSWORD_STRUCTv2.username,  TEXT("ExampleUserCode"));
    intlStrcpy(authInfo->GETPASSWORD_STRUCTv2.password,  TEXT("ExamplePassword"));

  return 0;
}

To indicate that a user name and password are used, set bValid to true. A value of false indicates that you do not want the function call to provide a user name and password.

To view the format of the data structure and callback that handles obtaining a user name and password from a third‑party DLL, see the GETPASSWORD_STRUCT type definition in the jomtypes.h file in your JADE includes directory.