public string CreateUser(string login, string password, string verfiyPassword, string firstName, string lastName, string ssoProvider = null, string country = "US") { CheckAuthentication(); var url = Url.Combine(Config.ServiceUrl, Constants.DOMAIN_URI, Config.Domain, Constants.DOMAIN_USERS_SUFFIX); var payload = new DomainUserRequest { AccountSetting = new AccountSetting { Login = login, Password = password, VerifyPassword = verfiyPassword, FirstName = firstName, LastName = lastName, SsoProvider = ssoProvider, Country = country } }; var response = JsonPostRequest(url, payload); var userResponse = JsonConvert.DeserializeObject(response, typeof(UriResponse)) as UriResponse; return userResponse.Uri.ExtractId(Constants.PROFILE_URI); }
public void UpdateSSOProvider(string profileId) { CheckAuthentication(); var url = Url.Combine(Config.ServiceUrl, Constants.PROFILE_URI, profileId); var payload = new DomainUserRequest() { AccountSetting = new AccountSetting() { SsoProvider = Config.Domain + ".com" } }; PutRequest(url, payload); }