i4SCADA Knowledge Base

WCF Ntlm Documentation

Abstract

The WCF Ntlm Web Service handles all the NTLM related operations. This article describes all the available methods.

This WCF web service handles all the NTLM related operations. The NTLM demands Windows Authentication for secure connections in order to retrieve Windows credentials. The following methods are available:

GetCallerAccountDetails()

Syntax

GetCallerAccountDetails();

Description

Retrieves the details about the user who initiated the call

Parameters

None

Return Value

The AccountDTO object, containing:

  • ClientHostName (string) - the name of the machine from where the method was called

  • DomainName (string) - the name of the Windows Domain in which the machine from where the method was called is part of

  • AuthorizationGroups (string[]) - a list of authorizations groups to which the current account belongs too

GetClientUserName()

Syntax

GetClientUserName();

Description

Retrieves the name of the user which is logged in on the client machine

Parameters

None

Return Value

The string representing the user name

LoginWindowsUser

Syntax

LoginWindowsUser(string sessionId, Guid clientId, int millisecondsTimeOut);

Description

Logs in the current windows user using the session and client ids

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (guid) - the user defined unique ID of the client from which the web service is called

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A security token which can be used in all subsequent secured operations

LoginWindowsUserByToken

Syntax

LoginWindowsUserByToken(string securityToken, int millisecondsTimeOut);

Description

Logs in the current windows user using the security token

Parameters

  • securityToken (string) - the security token returned by the Login method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A security token which can be used in all subsequent secured operations