SecurityManager.logon

Logs a user onto the system by calling the default System Logon Service identified in the Server Admin App > Security > User Authentication. Any roles and credentials associated with the user are also loaded as implemented by the Logon Service logic.

If the logon fails for any reason or returns a null userid, a LogonException is thrown. A LogonException contains the error code and error description returned from the Logon Service. These are available as methods {@link com.ebasetech.xi.exceptions.LogonException#getErrorCode() LogonException.getErrorCode()} and {@link com.ebasetech.xi.exceptions.LogonException#getMessage() LogonException.getMessage()} respectively.

When the logon is successful, method #isUserLoggedOn() returns true, the user name can be obtained using method #getUserName() and the other methods in this interface can be used to access the user's security roles and credentials as loaded by the Logon Service.

Further documentation.

Javascript example:

 try {
   system.securityManager.logon( [ 
          ["Script", fields.USER.value], 
          ["Script", fields.PASSWORD.value] 
           ] );
 }
 catch (e) {
   event.owner.addErrorMessage(e.javaException.message);
 }
 

Parameters

UNKNOWNjava.lang.String[][]  inParameters,