@@ -23,7 +23,7 @@ between the driver and the server.
23
23
To learn how to authenticate to MongoDB by using a Lightweight
24
24
Directory Access Protocol (LDAP) server, see the guide on
25
25
:ref:`rust-enterprise-auth`.
26
-
26
+
27
27
To learn more about connecting to a MongoDB deployment, see the
28
28
:ref:`rust-connect-to-mongodb`.
29
29
@@ -68,8 +68,8 @@ MongoDB supports the following SCRAM-based authentication mechanisms:
68
68
If you do not specify an authentication mechanism, the server
69
69
attempts to validate credentials by using the default authentication
70
70
mechanism, a SCRAM-based mechanism that varies depending on the
71
- version of the server that you are connecting to.
72
-
71
+ version of the server that you are connecting to.
72
+
73
73
The ``SCRAM-SHA-256`` mechanism is the default authentication
74
74
mechanism for MongoDB Server versions 4.0 and later.
75
75
@@ -80,7 +80,7 @@ MongoDB supports the following SCRAM-based authentication mechanisms:
80
80
- ``username``: Your username
81
81
- ``password``: Your password
82
82
- ``db``: The authentication database associated with the user
83
-
83
+
84
84
.. literalinclude:: /includes/fundamentals/code-snippets/auth.rs
85
85
:language: rust
86
86
:dedent:
@@ -144,7 +144,7 @@ feature flag to your ``mongodb`` dependency in your project's
144
144
145
145
.. code-block:: none
146
146
:emphasize-lines: 3
147
-
147
+
148
148
[dependencies.mongodb]
149
149
version = "{+version+}"
150
150
features = [ "aws-auth", ... ]
@@ -154,7 +154,7 @@ feature flag to your ``mongodb`` dependency in your project's
154
154
To use the ``MONGODB-AWS`` authentication mechanism in the
155
155
{+driver-short+}, your application must meet the following
156
156
requirements:
157
-
157
+
158
158
- You are connected to MongoDB Server version 4.4 or later.
159
159
- You are using the ``tokio`` asynchronous runtime.
160
160
@@ -189,7 +189,7 @@ the corresponding ways.
189
189
``mechanism`` field of your ``Credential`` struct to
190
190
``AuthMechanism::MongoDbAws``. This example specifies the
191
191
authentication mechanism by using the following placeholders:
192
-
192
+
193
193
- ``access key ID``: Your AWS access key ID
194
194
- ``secret access key``: Your AWS secret access key
195
195
- ``db``: The authentication database associated with the user
@@ -253,7 +253,7 @@ the corresponding ways.
253
253
.. code-block:: bash
254
254
255
255
export AWS_WEB_IDENTITY_TOKEN_FILE=<absolute path to OIDC token file>
256
-
256
+
257
257
Set the ``mechanism`` option in your
258
258
``Credential`` struct to ``AuthMechanism::MongoDbAws``. The driver
259
259
reads your AWS IAM credentials from the token file.
@@ -286,7 +286,7 @@ To specify the ``MONGODB-X509`` authentication mechanism, set the
286
286
``mechanism`` field of your ``Credential`` struct to
287
287
``AuthMechanism::MongoDbX509``. This example specifies the
288
288
authentication mechanism by using the following placeholders:
289
-
289
+
290
290
- ``path to CA certificate``: The filepath for your CA file
291
291
- ``path to private client key``: The filepath for your certificate key file
292
292
- ``db``: The authentication database associated with the user
@@ -320,6 +320,6 @@ guide, see the following API documentation:
320
320
321
321
- `Credential <{+api+}/options/struct.Credential.html>`__
322
322
- `ClientOptions <{+api+}/options/struct.ClientOptions.html>`__
323
- - `Client <{+api+}/options/ struct.Client.html>`__
323
+ - `Client <{+api+}/struct.Client.html>`__
324
324
- `Client::with_options() <{+api+}/struct.Client.html#method.with_options>`__
325
325
- `ClientOptions::parse() <{+api+}/options/struct.ClientOptions.html#method.parse>`__
0 commit comments