Type: IAuthenticationService

Summary:

Gets access to the authentication service

Remarks:

Methods:

DisplayLoginDialog

Summary:

Pops up the login form

Example:

This example shows you how to use this method:

            Client.Authentication.DisplayLoginDialog();
            

DisplayLoginDialog(System.Boolean,System.UInt32,System.UInt32)

Summary:

Pops up the login form

Parameters:

  1. atMousePosition: if true the form will pops up at mouse position
  2. x: if atMousePosition=false, the form will popups at position x, y
  3. y: if atMousePosition=false, the form will popups at position x, y

Example:

This example shows you how to use this method:

            Client.Authentication.DisplayLoginDialog(false, 200, 100);
            

Login(System.String,System.String)

Summary:

Try to log a specific user

Parameters:

  1. user: user name
  2. password: password

Example:

This example shows you how to use this method:

            Client.Authentication.Login("John", "1234");
            

Logoff

Summary:

Logoff the current user

Example:

This example shows you how to use this method:

            Client.Authentication.LogOff();
            

Properties

CurrentUserName

Summary:

Gets the current user name. This can be null if no user logged in.

Type:

System.String

Access:

Read

Example:

var user = Client.Authentication.CurrentUserName;

Events

UserChanged

Summary:

This event occurs after the current user changed.

Example:

This example shows you how to subscribe to this event

            //---- JAVASCRIPT:
            Client.Authentication.add_UserChanged(OnUserChanged);
            ...
            function OnUserChanged(){
                print("New user is: " + Client.Authentication.CurrentUserName);
            }