[][src]Enum mongodb::options::auth::AuthMechanism

pub enum AuthMechanism {
    MongoDbCr,
    ScramSha1,
    ScramSha256,
    MongoDbX509,
    Gssapi,
    Plain,
}

The authentication mechanisms supported by MongoDB.

Note: not all of these mechanisms are currently supported by the driver.

Variants

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.

Note: This mechanism is not currently supported by this driver but will be in the future.

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 authenticaiton. 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.

Note: This mechanism is not currently supported by this driver but will be in the future.

Methods

impl AuthMechanism[src]

pub fn validate_credential(&self, credential: &Credential) -> Result<()>[src]

Determines if the provided credentials have the required information to perform authentication.

pub fn as_str(&self) -> &'static str[src]

Trait Implementations

impl Clone for AuthMechanism[src]

impl Debug for AuthMechanism[src]

impl FromStr for AuthMechanism[src]

type Err = Error

The associated error which can be returned from parsing.

impl PartialEq<AuthMechanism> for AuthMechanism[src]

impl StructuralPartialEq for AuthMechanism[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,