Methods / Common Methods |
IIS does not support users who do not use Windows Active Directory authentication. To address this issue, AgilePoint uses a special type of user called an impersonator. Impersonators enable client applications to authenticate end users who use Active Directory authentication, as well as those who do not.
Impersonators must meet the following requirements:
This Surrogate function allows the impersonator to act as a surrogate for the specified user to complete IIS authentication. Once the authentication has passed, the web service API will be called based on the rights granted to the specified user on AgilePoint Server.
This function is called before calling any other AgilePoint Web Service API.
Name | Type | Description |
---|---|---|
userName | string | A string that contains the user name for the user. This member must be a registered AgilePoint user. |
public IWFWorkflowService GetWorkflowService( System.Net.ICredentials credentials, string surrogateUsername) { IWFWorkflowService svc = GetAdm(credentials); svc.Surrogate(surrogateUsername); return svc; } //Web service using Impersonator credentials that is registered in the AgilePoint Server //configuration with application name public IWFWorkflowService GetWorkflowService(System.Net.ICredentials credentials) { string url = … // AgilePoint Server web service Url System.Net.CookieContainer cookieContainer = new System.Net.CookieContainer(); WFWorkflowService svc = new WFWorkflowService(url); svc.CookieContainer = cookieContainer; svc.Credentials = credentials; svc.SetClientAppName([your application name]); //Current Locale svc.SetClientLocale(Thread.CurrentThread.CurrentUICulture.Name); return svc; }