Skip to content

Commit 4ac7d10

Browse files
authored
minor: make AuthMechanism non-exhaustive (#222)
1 parent cee49ec commit 4ac7d10

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/client/auth/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const PLAIN_STR: &str = "PLAIN";
3535
///
3636
/// Note: not all of these mechanisms are currently supported by the driver.
3737
#[derive(Clone, Deserialize, PartialEq, Debug)]
38+
#[non_exhaustive]
3839
pub enum AuthMechanism {
3940
/// MongoDB Challenge Response nonce and MD5 based authentication system. It is currently
4041
/// deprecated and will never be supported by this driver.
@@ -75,6 +76,13 @@ pub enum AuthMechanism {
7576
/// Note: This mechanism is not currently supported by this driver but will be in the future.
7677
Plain,
7778

79+
/// MONGODB-AWS authenticates using AWS IAM credentials (an access key ID and a secret access
80+
/// key), temporary AWS IAM credentials obtained from an AWS Security Token Service (STS)
81+
/// Assume Role request, or temporary AWS IAM credentials assigned to an EC2 instance or ECS
82+
/// task.
83+
///
84+
/// Note: Only server versions 4.4+ support AWS authentication. Additionally, the driver only
85+
/// supports AWS authentication with the tokio runtime.
7886
#[cfg(feature = "tokio-runtime")]
7987
MongoDbAws,
8088
}

0 commit comments

Comments
 (0)