@@ -53,8 +53,8 @@ Example Conventions
5353
5454Each authentication mechanism contains the following placeholders:
5555
56- * ``username `` - Your MongoDB username
57- * ``password `` - Your MongoDB user's password
56+ * ``db_username `` - Your MongoDB database username
57+ * ``db_password `` - Your MongoDB database user's password
5858* ``hostname`` - Your MongoDB servers network address, accessible by
5959 your client
6060* ``port`` - Your MongoDB servers port number
@@ -94,8 +94,8 @@ To specify the default authentication mechanism, omit the
9494
9595 credential := options.Credential{
9696 AuthSource: "<authenticationDb>",
97- Username: "<username >",
98- Password: "<password >",
97+ Username: "<db_username >",
98+ Password: "<db_password >",
9999 }
100100 clientOpts := options.Client().ApplyURI("mongodb://<hostname>:<port>").
101101 SetAuth(credential)
@@ -117,7 +117,7 @@ see the :manual:`SCRAM </core/security-scram/>` section of the server manual.
117117 in MongoDB 4.0.
118118
119119``SCRAM-SHA-256`` is a salted challenge-response authentication mechanism
120- (SCRAM) that uses your username and password, encrypted with the ``SHA-256``
120+ (SCRAM) that uses your database username and password, encrypted with the ``SHA-256``
121121algorithm, to authenticate your user.
122122
123123To specify the ``SCRAM-SHA-256`` authentication mechanism, assign the
@@ -129,8 +129,8 @@ To specify the ``SCRAM-SHA-256`` authentication mechanism, assign the
129129 credential := options.Credential{
130130 AuthMechanism: "SCRAM-SHA-256",
131131 AuthSource: "<authenticationDb>",
132- Username: "<username >",
133- Password: "<password >",
132+ Username: "<db_username >",
133+ Password: "<db_password >",
134134 }
135135 clientOpts := options.Client().ApplyURI("mongodb://<hostname>:<port>").
136136 SetAuth(credential)
@@ -161,8 +161,8 @@ To specify the ``SCRAM-SHA-1`` authentication mechanism, assign the
161161 credential := options.Credential{
162162 AuthMechanism: "SCRAM-SHA-1",
163163 AuthSource: "<authenticationDb>",
164- Username: "<username >",
165- Password: "<password >",
164+ Username: "<db_username >",
165+ Password: "<db_password >",
166166 }
167167 clientOpts := options.Client().ApplyURI("mongodb://<hostname>:<port>").
168168 SetAuth(credential)
0 commit comments