Method CreateMongoCRCredential
CreateMongoCRCredential(string, string, string)
Creates a credential used with MONGODB-CR.
[Obsolete("MONGODB-CR was replaced by SCRAM-SHA-1 in MongoDB 3.0, and is now deprecated.")]
public static MongoCredential CreateMongoCRCredential(string databaseName, string username, string password)
Parameters
databaseName
stringName of the database.
username
stringThe username.
password
stringThe password.
Returns
- MongoCredential
A credential for MONGODB-CR.
CreateMongoCRCredential(string, string, SecureString)
Creates a credential used with MONGODB-CR.
[Obsolete("MONGODB-CR was replaced by SCRAM-SHA-1 in MongoDB 3.0, and is now deprecated.")]
public static MongoCredential CreateMongoCRCredential(string databaseName, string username, SecureString password)
Parameters
databaseName
stringName of the database.
username
stringThe username.
password
SecureStringThe password.
Returns
- MongoCredential
A credential for MONGODB-CR.