m-Power developers have the ability to log end-user activity for signon/signoff of generated applications. This functionality is quite useful for a number of reasons, including:
- Logging which users have accessed their account, when and at what time.
- Logging which application a user has accessed.
- Logging how long someone stays active before they sign off.
- Capturing various components of a user’s information, including their IP address.
Configuration
To configure, install the mrcSignon2 logic into your data dictionary. Next, modify this tag:
<callrpg aftersignon=”SIGNON” beforesignoff=”SIGNOFF” rpglocal=”0″ /> to
<callrpg aftersignon=”NAME_OF_SIGNON_PGM” beforesignoff=”NAME_OF_SIGNOFF_PGM” rpglocal=”1″ />
Notice that, by default, rpglocal is set to 0. This indicates that the ability to log user activity has been disabled. Please set this value to 1 to activate this functionality.
When a user signs on, m-Power will immediately call the program referenced at the aftersignon=”” value. Conversely, when a user signs out, m-Power will immediately call the program referenced at the beforesignoff value. To utilize this functionality, you do not need to utilize both values.
By default, both the signon and signoff procedures accept two values: a User ID parameter and a Session ID parameter. These values are automatically passed from m-Power to the applicable procedure. However, if you wish to have even more flexibility within your auditing, add this line of code directly after the <callrpg> tag:
<parms_to_SIGNON value=” ” />
This tag allows you to pass additional values directly to the auditing programs. Available options are as follows:
- userId – User Name used by user to log in.
- sessionId – User’s current session ID
- remoteIp – The IP address of the client’s broswer
- remoteUrl – The URL the client utilized to access the Sign on page.
You can utilize any combination of the above parameters. Be sure to separate them with a “;”. Additionally, be sure that the parameters you are passing are in the same order as they are referenced in your external procedure.
Verify the accuracy of your program by examining the table referenced in your external procedure to determine if signon/signoff activity is being logged.