//------------------------------------------------------- // User administration //------------------------------------------------------- /// <summary> /// Create user with password and roles. Clear-text password will be hashed using bcrypt /// before sending to server. /// </summary> /// <param name="policy">admin configuration parameters, pass in null for defaults</param> /// <param name="user">user name</param> /// <param name="password">user password in clear-text format</param> /// <param name="roles">variable arguments array of role names. Predefined roles are listed in Role.cs</param> public void CreateUser(AdminPolicy policy, string user, string password, IList<string> roles) { string hash = AdminCommand.HashPassword(password); AdminCommand command = new AdminCommand(); command.CreateUser(cluster, policy, user, hash, roles); }