Logging in to an IMu server

When an IMu based program connects to an IMu server it is given a default level of access to EMu modules.

It is possible for an IMu based program to override this level of access by explicitly logging in to the server as a registered user of EMu. This is done by using the IMuSession's login method. Once the login method has been called successfully the session remains authenticated until the logout method is called.

The login method

The login method is used to authenticate the program as a registered user of EMu. Once successfully authenticated access to EMu modules is at the level of the authenticated user rather than the default imuserver user.

Arguments

  • username

    The name of the user to login as. This must be the name of a registered EMu user on the system.

  • password

    The user's password. This argument is optional and if it is not supplied it defaults to null.

    Note: Supplying a null password is uncommon but it is sometimes a valid thing to do. If the server receives a password of null it will try to authenticate the user using server-side methods such as verification against EMu's .rhosts file.

  • spawn

    A boolean value indicating whether the IMu server should create a separate process dedicated to handling this program's requests. This argument is optional and if not supplied it defaults to true.

The logout method

The logout method relinquishes access as the previously authenticated user.

Note: Logging in this way is very similar to logging into the same EMu environment using the EMu client. Access to records is controlled via record-level security.

Warning

Logging in causes the IMu server to start a new texserver process to handle all access to EMu module. This new texserver process will use a Texpress licence. The licence will not be freed until the logout method is called. See the server FAQ How does IMu use Texpress licences? for more information.