@@ -53,8 +53,8 @@ Example Conventions
53
53
54
54
Each authentication mechanism contains the following placeholders:
55
55
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
58
58
* ``hostname`` - Your MongoDB servers network address, accessible by
59
59
your client
60
60
* ``port`` - Your MongoDB servers port number
@@ -94,8 +94,8 @@ To specify the default authentication mechanism, omit the
94
94
95
95
credential := options.Credential{
96
96
AuthSource: "<authenticationDb>",
97
- Username: "<username >",
98
- Password: "<password >",
97
+ Username: "<db_username >",
98
+ Password: "<db_password >",
99
99
}
100
100
clientOpts := options.Client().ApplyURI("mongodb://<hostname>:<port>").
101
101
SetAuth(credential)
@@ -117,7 +117,7 @@ see the :manual:`SCRAM </core/security-scram/>` section of the server manual.
117
117
in MongoDB 4.0.
118
118
119
119
``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``
121
121
algorithm, to authenticate your user.
122
122
123
123
To specify the ``SCRAM-SHA-256`` authentication mechanism, assign the
@@ -129,8 +129,8 @@ To specify the ``SCRAM-SHA-256`` authentication mechanism, assign the
129
129
credential := options.Credential{
130
130
AuthMechanism: "SCRAM-SHA-256",
131
131
AuthSource: "<authenticationDb>",
132
- Username: "<username >",
133
- Password: "<password >",
132
+ Username: "<db_username >",
133
+ Password: "<db_password >",
134
134
}
135
135
clientOpts := options.Client().ApplyURI("mongodb://<hostname>:<port>").
136
136
SetAuth(credential)
@@ -161,8 +161,8 @@ To specify the ``SCRAM-SHA-1`` authentication mechanism, assign the
161
161
credential := options.Credential{
162
162
AuthMechanism: "SCRAM-SHA-1",
163
163
AuthSource: "<authenticationDb>",
164
- Username: "<username >",
165
- Password: "<password >",
164
+ Username: "<db_username >",
165
+ Password: "<db_password >",
166
166
}
167
167
clientOpts := options.Client().ApplyURI("mongodb://<hostname>:<port>").
168
168
SetAuth(credential)
0 commit comments