public UAFConnector() { LeanFactory.Initialize("USER_APPLICATION"); //_serviceEvent = new ServiceEventGateway(); _leanPlatform = LeanFactory.Create(); var principal = ClaimsPrincipal.Current; _leanPlatform.SetWindowsAuthentication(); //Impersonate("Administrator", "SwqaMe$1"); }
public UAFConnector(string username, string password) { var tokenManager = new TokenManager(username, password, "", Environment.MachineName); var token = tokenManager.GetToken(); LeanFactory.Initialize("USER_APPLICATION"); //_serviceEvent = new ServiceEventGateway(); _leanPlatform = LeanFactory.Create(); _leanPlatform.SetAuthenticationToken(token); //Impersonate(username, password); }