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
connection
IConnectionThe connection.
description
ConnectionDescriptionThe connection description.
cancellationToken
CancellationTokenThe cancellation token.
AuthenticateAsync(IConnection, ConnectionDescription, CancellationToken)
Authenticates the connection.
Task AuthenticateAsync(IConnection connection, ConnectionDescription description, CancellationToken cancellationToken)
Parameters
connection
IConnectionThe connection.
description
ConnectionDescriptionThe connection description.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A Task.
CustomizeInitialHelloCommand(BsonDocument)
Optionally customizes hello or legacy hello command.
BsonDocument CustomizeInitialHelloCommand(BsonDocument helloCommand)
Parameters
helloCommand
BsonDocumentInitial command.
Returns
- BsonDocument
Optionally mutated command.