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
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AuthMechanism
impl Debug for AuthMechanism
sourceimpl<'de> Deserialize<'de> for AuthMechanism
impl<'de> Deserialize<'de> for AuthMechanism
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl FromStr for AuthMechanism
impl FromStr for AuthMechanism
sourceimpl PartialEq<AuthMechanism> for AuthMechanism
impl PartialEq<AuthMechanism> for AuthMechanism
impl StructuralPartialEq for AuthMechanism
Auto Trait Implementations
impl RefUnwindSafe for AuthMechanism
impl Send for AuthMechanism
impl Sync for AuthMechanism
impl Unpin for AuthMechanism
impl UnwindSafe for AuthMechanism
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more