Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/client/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::{bson::RawDocumentBuf, bson_compat::cstr, options::ClientOptions};
use derive_where::derive_where;
use hmac::{digest::KeyInit, Mac};
use rand::Rng;
use serde::Deserialize;
use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;

use self::scram::ScramVersion;
Expand All @@ -44,7 +44,7 @@ const MONGODB_OIDC_STR: &str = "MONGODB-OIDC";
/// The authentication mechanisms supported by MongoDB.
///
/// Note: not all of these mechanisms are currently supported by the driver.
#[derive(Clone, Deserialize, PartialEq, Debug)]
#[derive(Clone, Deserialize, Serialize, PartialEq, Debug)]
#[non_exhaustive]
pub enum AuthMechanism {
/// MongoDB Challenge Response nonce and MD5 based authentication system. It is currently
Expand Down Expand Up @@ -558,8 +558,7 @@ impl Credential {
mechanism.authenticate_stream(conn, self, opts).await
}

#[cfg(test)]
pub(crate) fn serialize_for_client_options<S>(
pub(crate) fn serialize<S>(
credential: &Option<Credential>,
serializer: S,
) -> std::result::Result<S::Ok, S::Error>
Expand Down
Loading