Enabling Authentication

It is always wise to enable authentication for Server Monitor so only authorized users can access and manage it.

Enabling authentication is straightforward: handle the OnControlPanelLogin event of your ServerModule.

ServerModule.pas
procedure TUniServerModule.UniGUIServerModuleControlPanelLogin(
  ASession: TUniGUISession; const AUser, APassword: string;
  var LoginValid: Boolean; LoginAttempt: Integer);
begin
  if (AUser = 'admin user') and (APassword = 'strong pwd') then
  begin
    LoginValid := True;
  end;
end;

When authentication is enabled, the following login screen will be displayed each time you access Server Monitor:

Related: Developer's Guide > Using Server Monitor (Server Control Panel) Links preserved from source:

  • https://unigui.com/doc/online_help/using-server-monitor-(server-c.htm

  • https://unigui.com/doc/online_help/index.html?enabling-authentication.htm

Atualizado