Table of Contents

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

credential UsernamePasswordCredential

The credentials.

properties IEnumerable<KeyValuePair<string, string>>

The properties.

serverApi ServerApi

The 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

username string

The username.

properties IEnumerable<KeyValuePair<string, string>>

The properties.

serverApi ServerApi

The 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

connection IConnection

The connection.

description ConnectionDescription

The connection description.

cancellationToken CancellationToken

The cancellation token.

AuthenticateAsync(IConnection, ConnectionDescription, CancellationToken)

Authenticates the connection.

public override Task AuthenticateAsync(IConnection connection, ConnectionDescription description, CancellationToken cancellationToken)

Parameters

connection IConnection

The connection.

description ConnectionDescription

The connection description.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A Task.