@@ -102,11 +102,6 @@ see the :manual:`SCRAM </core/security-scram/>` section of the Server manual.
102102``SCRAM-SHA-256``
103103~~~~~~~~~~~~~~~~~
104104
105- .. note::
106-
107- ``SCRAM-SHA-256`` is the default authentication method for MongoDB starting
108- in MongoDB 4.0.
109-
110105``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism
111106(SCRAM) that uses your username and password, encrypted with the ``SHA-256``
112107algorithm, to authenticate your user.
@@ -150,58 +145,6 @@ mechanism:
150145 .. literalinclude:: /examples/generated/AuthTest.snippet.scram-sha-256-cred.kt
151146 :language: kotlin
152147
153- .. _scram-sha-1-auth-mechanism:
154-
155- ``SCRAM-SHA-1``
156- ~~~~~~~~~~~~~~~
157-
158- .. note::
159- ``SCRAM-SHA-1`` is the default authentication method for MongoDB versions
160- 3.0, 3.2, 3.4, and 3.6.
161-
162- ``SCRAM-SHA-1`` is a salted challenge-response mechanism (SCRAM) that uses your
163- username and password, encrypted with the ``SHA-1`` algorithm, to authenticate
164- your user.
165-
166- The following code snippets show how to specify the authentication mechanism,
167- using the following placeholders:
168-
169- * ``db_username`` - your MongoDB database username.
170- * ``db_password`` - your MongoDB database user's password.
171- * ``hostname`` - network address of your MongoDB server, accessible by your client.
172- * ``port`` - port number of your MongoDB server.
173- * ``authenticationDb`` - MongoDB database that contains your user's
174- authentication data. If you omit this parameter, the driver uses the
175- default value ``admin``.
176-
177- Select the :guilabel:`Connection String` or the :guilabel:`MongoCredential`
178- tab below for instructions and sample code for specifying this authentication
179- mechanism:
180-
181- .. tabs::
182-
183- .. tab::
184- :tabid: Connection String
185-
186- To specify the ``SCRAM-SHA-1`` authentication mechanism using a
187- connection string, assign the ``authMechanism`` parameter the value
188- ``SCRAM-SHA-1`` in your connection string. Your code to instantiate
189- a ``MongoClient`` should resemble the following:
190-
191- .. literalinclude:: /examples/generated/AuthTest.snippet.scram-sha-1-string.kt
192- :language: kotlin
193-
194- .. tab::
195- :tabid: MongoCredential
196-
197- To specify the default authentication mechanism using the
198- ``MongoCredential`` class, use the
199- `createScramSha1Credential() <{+core-api+}/MongoCredential.html#createScramSha1Credential(java.lang.String,java.lang.String,char[])>`__
200- method. Your code to instantiate a ``MongoClient`` should resemble the following:
201-
202- .. literalinclude:: /examples/generated/AuthTest.snippet.scram-sha-1-cred.kt
203- :language: kotlin
204-
205148.. _mongodb-aws-auth-mechanism:
206149
207150``MONGODB-AWS``
0 commit comments