UsernamePasswordCredential Class |
Namespace: MongoDB.Driver.Core.Authentication
The UsernamePasswordCredential type exposes the following members.
| Name | Description | |
|---|---|---|
| UsernamePasswordCredential(String, String, SecureString) |
Initializes a new instance of the UsernamePasswordCredential class.
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.
See Driver Authentication: SCRAM-SHA-256
for additional details.
| |
| UsernamePasswordCredential(String, String, String) |
Initializes a new instance of the UsernamePasswordCredential class.
|
| Name | Description | |
|---|---|---|
| Password |
Gets the password.
| |
| SaslPreppedPassword |
Gets the the SASLprepped password.
May create a cleartext copy of the password in managed memory the first time it is accessed.
Use only as needed e.g. for SCRAM-SHA-256.
| |
| Source |
Gets the source.
| |
| Username |
Gets the username.
|
| Name | Description | |
|---|---|---|
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetInsecurePassword |
Gets the password (converts the password from a SecureString to a regular string).
| |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
| ToBson |
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.) | |
| ToBsonDocument |
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.) | |
| ToJson |
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.) |