Class ScramShaAuthenticator
- Namespace
- MongoDB.Driver.Core.Authentication
- Assembly
- MongoDB.Driver.Core.dll
A SCRAM-SHA SASL authenticator.
public abstract class ScramShaAuthenticator : SaslAuthenticator, IAuthenticator
- Inheritance
-
ScramShaAuthenticator
- Implements
- Derived
- Inherited Members
Constructors
ScramShaAuthenticator(UsernamePasswordCredential, HashAlgorithmName, H, Hi, Hmac)
Initializes a new instance of the ScramShaAuthenticator class.
[Obsolete("Use the newest overload instead.")]
protected ScramShaAuthenticator(UsernamePasswordCredential credential, HashAlgorithmName hashAlgorithmName, ScramShaAuthenticator.H h, ScramShaAuthenticator.Hi hi, ScramShaAuthenticator.Hmac hmac)
Parameters
credential
UsernamePasswordCredentialThe credential.
hashAlgorithmName
HashAlgorithmNameThe hash algorithm name.
h
ScramShaAuthenticator.HThe H function to use.
hi
ScramShaAuthenticator.HiThe Hi function to use.
hmac
ScramShaAuthenticator.HmacThe Hmac function to use.
ScramShaAuthenticator(UsernamePasswordCredential, HashAlgorithmName, H, Hi, Hmac, ServerApi)
Initializes a new instance of the ScramShaAuthenticator class.
protected ScramShaAuthenticator(UsernamePasswordCredential credential, HashAlgorithmName hashAlgorithmName, ScramShaAuthenticator.H h, ScramShaAuthenticator.Hi hi, ScramShaAuthenticator.Hmac hmac, ServerApi serverApi)
Parameters
credential
UsernamePasswordCredentialThe credential.
hashAlgorithmName
HashAlgorithmNameThe hash algorithm name.
h
ScramShaAuthenticator.HThe H function to use.
hi
ScramShaAuthenticator.HiThe Hi function to use.
hmac
ScramShaAuthenticator.HmacThe Hmac function to use.
serverApi
ServerApiThe server API.
Properties
DatabaseName
Gets the name of the database.
public override string DatabaseName { get; }
Property Value
- string
The name of the database.
Methods
CustomizeInitialHelloCommand(BsonDocument)
Optionally customizes hello or legacy hello command.
public override BsonDocument CustomizeInitialHelloCommand(BsonDocument helloCommand)
Parameters
helloCommand
BsonDocumentInitial command.
Returns
- BsonDocument
Optionally mutated command.