Enum mungos::options::AuthMechanism
source · [−]#[non_exhaustive]
pub enum AuthMechanism {
MongoDbCr,
ScramSha1,
ScramSha256,
MongoDbX509,
Gssapi,
Plain,
}
Expand description
The authentication mechanisms supported by MongoDB.
Note: not all of these mechanisms are currently supported by the driver.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
MongoDbCr
MongoDB Challenge Response nonce and MD5 based authentication system. It is currently deprecated and will never be supported by this driver.
ScramSha1
The SCRAM-SHA-1 mechanism as defined in RFC 5802.
See the MongoDB documentation for more information.
ScramSha256
The SCRAM-SHA-256 mechanism which extends RFC 5802 and is formally defined in RFC 7677.
See the MongoDB documentation for more information.
MongoDbX509
The MONGODB-X509 mechanism based on the usage of X.509 certificates to validate a client where the distinguished subject name of the client certificate acts as the username.
See the MongoDB documentation for more information.
Gssapi
Kerberos authentication mechanism as defined in RFC 4752.
See the MongoDB documentation for more information.
Note: This mechanism is not currently supported by this driver but will be in the future.
Plain
The SASL PLAIN mechanism, as defined in RFC 4616, is used in MongoDB to perform LDAP authentication and cannot be used for any other type of authentication. Since the credentials are stored outside of MongoDB, the “$external” database must be used for authentication.
See the MongoDB documentation for more information on LDAP authentication.
Implementations
sourceimpl AuthMechanism
impl AuthMechanism
sourcepub fn validate_credential(&self, credential: &Credential) -> Result<(), Error>
pub fn validate_credential(&self, credential: &Credential) -> Result<(), Error>
Determines if the provided credentials have the required information to perform authentication.
Trait Implementations
sourceimpl Clone for AuthMechanism
impl Clone for AuthMechanism
sourcefn clone(&self) -> AuthMechanism
fn clone(&self) -> AuthMechanism
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more