Table of Contents

Method CreateMongoCRCredential

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

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 string

Name of the database.

username string

The username.

password string

The 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 string

Name of the database.

username string

The username.

password SecureString

The password.

Returns

MongoCredential

A credential for MONGODB-CR.