@@ -86,8 +86,15 @@ pub enum AuthMechanism {
8686 /// Assume Role request, or temporary AWS IAM credentials assigned to an EC2 instance or ECS
8787 /// task.
8888 ///
89- /// Note: Only server versions 4.4+ support AWS authentication. Additionally, the driver only
90- /// supports AWS authentication with the tokio runtime.
89+ /// The driver uses the [AWS SDK](https://github.com/awslabs/aws-sdk-rust) to retrieve AWS
90+ /// credentials. If you have a shared AWS credentials or config file, then those credentials
91+ /// will be used by default if AWS authentication environment variables are not set. To
92+ /// override this behavior, set `AWS_SHARED_CREDENTIALS_FILE=""` in your shell or set the
93+ /// equivalent environment variable value in your script or application. Alternatively, you
94+ /// can create an AWS profile specifically for your MongoDB credentials and set the
95+ /// `AWS_PROFILE` environment variable to that profile name.
96+ ///
97+ /// Note: Only server versions 4.4+ support AWS authentication.
9198 #[ cfg( feature = "aws-auth" ) ]
9299 MongoDbAws ,
93100
@@ -320,7 +327,7 @@ impl AuthMechanism {
320327 }
321328 #[ cfg( feature = "aws-auth" ) ]
322329 AuthMechanism :: MongoDbAws => {
323- aws:: authenticate_stream ( stream, credential, server_api, & opts . http_client ) . await
330+ aws:: authenticate_stream ( stream, credential, server_api) . await
324331 }
325332 AuthMechanism :: MongoDbCr => Err ( ErrorKind :: Authentication {
326333 message : "MONGODB-CR is deprecated and not supported by this driver. Use SCRAM \
@@ -414,8 +421,6 @@ impl FromStr for AuthMechanism {
414421// Auxiliary information needed by authentication mechanisms.
415422pub ( crate ) struct AuthOptions {
416423 server_api : Option < ServerApi > ,
417- #[ cfg( feature = "aws-auth" ) ]
418- http_client : crate :: runtime:: HttpClient ,
419424 #[ cfg( feature = "gssapi-auth" ) ]
420425 resolver_config : Option < ResolverConfig > ,
421426}
@@ -424,8 +429,6 @@ impl From<&ClientOptions> for AuthOptions {
424429 fn from ( opts : & ClientOptions ) -> Self {
425430 Self {
426431 server_api : opts. server_api . clone ( ) ,
427- #[ cfg( feature = "aws-auth" ) ]
428- http_client : crate :: runtime:: HttpClient :: default ( ) ,
429432 #[ cfg( feature = "gssapi-auth" ) ]
430433 resolver_config : opts. resolver_config . clone ( ) ,
431434 }
0 commit comments