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§
source§impl 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§
source§impl Clone for AuthMechanism
impl Clone for AuthMechanism
source§fn clone(&self) -> AuthMechanism
fn clone(&self) -> AuthMechanism
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AuthMechanism
impl Debug for AuthMechanism
source§impl<'de> Deserialize<'de> for AuthMechanism
impl<'de> Deserialize<'de> for AuthMechanism
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<AuthMechanism, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<AuthMechanism, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl FromStr for AuthMechanism
impl FromStr for AuthMechanism
source§impl PartialEq<AuthMechanism> for AuthMechanism
impl PartialEq<AuthMechanism> for AuthMechanism
source§fn eq(&self, other: &AuthMechanism) -> bool
fn eq(&self, other: &AuthMechanism) -> bool
self
and other
values to be equal, and is used
by ==
.