MongoClientSettings.username

If set to non-empty string, use this username to try to authenticate with to the database. Only has an effect if digest or sslPEMKeyFile is set too

Use authenticatePassword or authenticateSSL to automatically fill this.

class MongoClientSettings
string username;

Meta