@@ -48,29 +48,31 @@ Mechanisms
4848----------
4949
5050.. _default-auth-mechanism:
51+ .. _scram-sha-256-auth-mechanism:
5152
52- Default
53- ~~~~~~~
53+ ``SCRAM-SHA-256``
54+ ~~~~~~~~~~~~~~~~~
5455
55- The default authentication mechanism is ``SCRAM-SHA-256``.
56+ ``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism
57+ (SCRAM) that uses your username and password, encrypted with the ``SHA-256``
58+ algorithm, to authenticate your user. This is the default authentication
59+ mechanism.
5660
5761The following code snippets show how to specify the authentication mechanism,
5862using the following placeholders:
5963
60- * ``db_username`` - your MongoDB database username
61- * ``db_password`` - your MongoDB database user's password
62- * ``hostname`` - network address of your MongoDB server, accessible by your client
63- * ``port`` - port number of your MongoDB server
64+ * ``db_username`` - your MongoDB database username.
65+ * ``db_password`` - your MongoDB database user's password.
66+ * ``hostname`` - network address of your MongoDB server, accessible by your client.
67+ * ``port`` - port number of your MongoDB server.
6468* ``authenticationDb`` - MongoDB database that contains your user's
6569 authentication data. If you omit this parameter, the driver uses the
6670 default value ``admin``.
6771
6872Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
69- tab below for instructions and sample code for specifying this authentication
73+ tab below for instructions and sample code to specify this default authentication
7074mechanism:
7175
72- .. _mongo-client-setting-with-mongo-credential-example:
73-
7476.. tabs::
7577
7678 .. tab::
@@ -93,33 +95,10 @@ mechanism:
9395 .. literalinclude:: /examples/generated/AuthTest.snippet.default-mongo-cred.kt
9496 :language: kotlin
9597
96- For more information on the challenge-response (CR) and salted
97- challenge-response authentication mechanisms (SCRAM) that MongoDB supports,
98- see the :manual:`SCRAM </core/security-scram/>` section of the Server manual.
99-
100- .. _scram-sha-256-auth-mechanism:
101-
102- ``SCRAM-SHA-256``
103- ~~~~~~~~~~~~~~~~~
104-
105- ``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism
106- (SCRAM) that uses your username and password, encrypted with the ``SHA-256``
107- algorithm, to authenticate your user.
108-
109- The following code snippets show how to specify the authentication mechanism,
110- using the following placeholders:
111-
112- * ``db_username`` - your MongoDB database username.
113- * ``db_password`` - your MongoDB database user's password.
114- * ``hostname`` - network address of your MongoDB server, accessible by your client.
115- * ``port`` - port number of your MongoDB server.
116- * ``authenticationDb`` - MongoDB database that contains your user's
117- authentication data. If you omit this parameter, the driver uses the
118- default value ``admin``.
119-
120- Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
121- tab below for instructions and sample code for specifying this authentication
122- mechanism:
98+ You can also explicitly specify the ``SCRAM-SHA-256`` authentication mechanism,
99+ as shown in the following code snippets. Select the :guilabel:`Connection String`
100+ or the :guilabel:`MongoCredential` tab below for instructions and sample code for
101+ specifying this authentication mechanism:
123102
124103.. tabs::
125104
0 commit comments