Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions source/security/auth-mechanisms/scram.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ The code examples on this page use the following placeholders:
to a MongoDB Atlas cluster. To learn more about the ``+srv`` option, see
:manual:`Connection String Formats </reference/connection-string/#connection-string-formats>`
in the {+mdb-server+} manual.
- ``<username>``: The MongoDB username of the user to authenticate.
- ``<password>``: The MongoDB password of the user to authenticate.
- ``<db_username>``: The MongoDB username of the user to authenticate.
- ``<db_password>``: The MongoDB password of the user to authenticate.
- ``<hostname>``: The network address of your MongoDB deployment.
- ``<port>``: The port number of your MongoDB deployment. If you omit this parameter,
the driver uses the default port number (``27017``). You don't need a port number
Expand Down Expand Up @@ -78,16 +78,16 @@ see the corresponding syntax:

.. code-block:: ruby

client = Mongo::Client.new('mongodb[+srv]://<username>:<password>@<hostname>[:<port>]/?authSource=<authentication_db>')
client = Mongo::Client.new('mongodb[+srv]://<db_username>:<db_password>@<hostname>[:<port>]/?authSource=<authentication_db>')

.. tab:: Client Options
:tabid: default-mongo-credential

.. code-block:: ruby

client = Mongo::Client.new('<hostname>',
user: '<username>',
password: '<password>')
user: '<db_username>',
password: '<db_password>')

API Documentation
-----------------
Expand Down
Loading