Click or drag to resize

MongoCredential Methods

The MongoCredential type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCreateCredential(String, String, SecureString)
Creates a default credential. Less secure when used in conjunction with SCRAM-SHA-256, due to the need to store the password in a managed string in order to SaslPrep it. In .NET Standard, authenticating via SCRAM-SHA-256 may not work with non-ASCII passwords because SaslPrep is not fully implemented due to the lack of a string normalization function in .NET Standard 1.5. Normalizing the password into Unicode Normalization Form KC beforehand MAY help. SCRAM-SHA-1 is the recommended alternative for now.
Public methodStatic memberCreateCredential(String, String, String)
Creates a default credential. In .NET Standard, authenticating via SCRAM-SHA-256 may not work with non-ASCII passwords because SaslPrep is not fully implemented due to the lack of a string normalization function in .NET Standard 1.5. Normalizing the password into Unicode Normalization Form KC beforehand MAY help. SCRAM-SHA-1 is the recommended alternative for now.
Public methodStatic memberCreateGssapiCredential(String)
Creates a GSSAPI credential.
Public methodStatic memberCreateGssapiCredential(String, SecureString)
Creates a GSSAPI credential.
Public methodStatic memberCreateGssapiCredential(String, String)
Creates a GSSAPI credential.
Public methodStatic memberCreateMongoCRCredential(String, String, SecureString) Obsolete.
Creates a credential used with MONGODB-CR.
Public methodStatic memberCreateMongoCRCredential(String, String, String) Obsolete.
Creates a credential used with MONGODB-CR.
Public methodStatic memberCreateMongoX509Credential
Creates a credential used with MONGODB-X509.
Public methodStatic memberCreatePlainCredential(String, String, SecureString)
Creates a PLAIN credential.
Public methodStatic memberCreatePlainCredential(String, String, String)
Creates a PLAIN credential.
Public methodEquals(Object)
Compares this MongoCredential to another MongoCredential.
(Overrides ObjectEquals(Object).)
Public methodEquals(MongoCredential)
Compares this MongoCredential to another MongoCredential.
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Gets the hashcode for the credential.
(Overrides ObjectGetHashCode.)
Public methodGetMechanismPropertyT
Gets the mechanism property.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string representation of the credential.
(Overrides ObjectToString.)
Public methodWithMechanismProperty
Creates a new MongoCredential with the specified mechanism property.
Top
Extension Methods
  NameDescription
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also