Interface IAuthenticator
- Namespace
- MongoDB.Driver.Core.Authentication
- Assembly
- MongoDB.Driver.Core.dll
Represents a connection authenticator.
public interface IAuthenticator
Properties
Name
Gets the name of the authenticator.
string Name { get; }
Property Value
- string
The name.
Methods
Authenticate(IConnection, ConnectionDescription, CancellationToken)
Authenticates the connection.
void Authenticate(IConnection connection, ConnectionDescription description, CancellationToken cancellationToken)
Parameters
connectionIConnectionThe connection.
descriptionConnectionDescriptionThe connection description.
cancellationTokenCancellationTokenThe cancellation token.
AuthenticateAsync(IConnection, ConnectionDescription, CancellationToken)
Authenticates the connection.
Task AuthenticateAsync(IConnection connection, ConnectionDescription description, CancellationToken cancellationToken)
Parameters
connectionIConnectionThe connection.
descriptionConnectionDescriptionThe connection description.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- Task
A Task.
CustomizeInitialHelloCommand(BsonDocument)
Optionally customizes hello or legacy hello command.
BsonDocument CustomizeInitialHelloCommand(BsonDocument helloCommand)
Parameters
helloCommandBsonDocumentInitial command.
Returns
- BsonDocument
Optionally mutated command.