User Authentication for Rich Client Applications (Magic xpa 4.x)
User authentication is based on the same implementation as the Online environment and, as such, is dealt with in the same way.
When launching the application, the Magic xpa Runtime checks via the Magic.ini settings whether user authentication is required. If a logon dialog box is required, the Runtime engine displays the Magic xpa Logon dialog box.
To retrieve environment variables when loading the application, you can specify the environment variable in the HTML file in the envvars argument. This can be done via the Rich Client Deployment builder.
These environment variables will be sent to the server and be available even before the Rich Client module gets to the client side (as opposed to the ClientOSEnvGet function). By using this method, you can retrieve the variables using the GetParam function and condition initial programs accordingly.
You can pass parameters to a Rich Client application by specifying them in the entry point URL.
These parameters can then be used by the GetParam() function.
For example, when running a Rich Client program via the following URL:
http://server/MagicRIAApplications/project/project.application?N1=v1&N2=v2 ,
the v1 value can be retrieved by evaluating GetParam('N1') and v2 by GetParam('N2').