All Classes Namespaces Functions Properties Pages
Public Member Functions | List of all members
WindowsUserService Class Reference

Provides methods for logon More...

Public Member Functions

string GetWindowsUser ()
 Retrieves the Windows user name of the currently logged in user. More...
 
Session2 LogOnWithWindowsAuthentication (short logOnProtocol, bool unconditionalLogOn)
 Logs in the current Windows user using Windows authentication. More...
 

Description

Provides methods for logon

Member Functions

string GetWindowsUser ( )

Retrieves the Windows user name of the currently logged in user.

Returns
A string containing the Windows usecond FULLBUILDr name
Remarks
This API can only be called from custom web pages and it is not supported from Form actions(as they always run on the app server and don't have access to the calling Windows user).
Security
No restrictions apply.
Session2 LogOnWithWindowsAuthentication ( short  logOnProtocol,
bool  unconditionalLogOn 
)

Logs in the current Windows user using Windows authentication.

Parameters
logOnProtocolSpecifies the type of Logon Protocol to use.
unconditionalLogOnIndicates that a new session should be created if the user is already logged on
Returns
Returns a Session2 object that contains session information.
Name Type Comment
ReserveLicenseUsed Boolean Indicates whether the user uses a reserve license
SessionId String The user's session ID
ResourceId String The user's user ID
DisplayName String The user's name
isValid Boolean Will be true if the session is valid
LogonState LogonState The logon state information
Remarks
Calling this API from a process is not supported, but calling this API from a form is supported. This API is not supported in a multi-tenancy environment.
If the server setting Allow Mulitple Logon is set to true then UnconditionalLogOn has no effect. If the user is already logged in then the existing session will be returned otherwise a new one will be created.
If Allow Mulitple Logon is set to false and UnconditionalLogOn is also false then an exception will be raised if the user is already logged on. If they were not logged on then a new session will created.
If Allow Mulitple Logon is set to false and UnconditionalLogOn is true then:
  • If the user was already logged on then they will be logged off and a new session created.
  • If the user was not already logged on then a new session will be created for them. When the user logs on and if Allow Mulitple Logon is false, all the taken activities are reset to pending. This API can only be called from custom web pages and it is not supported from Form actions(as they always run on the app server and don't have access to the calling Windows user).
Security
No restrictions apply.