Class MongoAWSAuthenticator
- Namespace
- MongoDB.Driver.Core.Authentication
- Assembly
- MongoDB.Driver.Core.dll
The Mongo AWS authenticator.
public class MongoAWSAuthenticator : SaslAuthenticator, IAuthenticator
- Inheritance
-
MongoAWSAuthenticator
- Implements
- Inherited Members
Constructors
MongoAWSAuthenticator(UsernamePasswordCredential, IEnumerable<KeyValuePair<string, string>>, ServerApi)
Initializes a new instance of the MongoAWSAuthenticator class.
public MongoAWSAuthenticator(UsernamePasswordCredential credential, IEnumerable<KeyValuePair<string, string>> properties, ServerApi serverApi)
Parameters
credentialUsernamePasswordCredentialThe credentials.
propertiesIEnumerable<KeyValuePair<string, string>>The properties.
serverApiServerApiThe server API.
MongoAWSAuthenticator(string, IEnumerable<KeyValuePair<string, string>>, ServerApi)
Initializes a new instance of the MongoAWSAuthenticator class.
public MongoAWSAuthenticator(string username, IEnumerable<KeyValuePair<string, string>> properties, ServerApi serverApi)
Parameters
usernamestringThe username.
propertiesIEnumerable<KeyValuePair<string, string>>The properties.
serverApiServerApiThe server API.
Properties
DatabaseName
Gets the name of the database.
public override string DatabaseName { get; }
Property Value
- string
The name of the database.
MechanismName
Gets the name of the mechanism.
public static string MechanismName { get; }
Property Value
- string
The name of the mechanism.
Methods
Authenticate(IConnection, ConnectionDescription, CancellationToken)
Authenticates the connection.
public override void Authenticate(IConnection connection, ConnectionDescription description, CancellationToken cancellationToken)
Parameters
connectionIConnectionThe connection.
descriptionConnectionDescriptionThe connection description.
cancellationTokenCancellationTokenThe cancellation token.
AuthenticateAsync(IConnection, ConnectionDescription, CancellationToken)
Authenticates the connection.
public override Task AuthenticateAsync(IConnection connection, ConnectionDescription description, CancellationToken cancellationToken)
Parameters
connectionIConnectionThe connection.
descriptionConnectionDescriptionThe connection description.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
A Task.