File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
includes/fundamentals/code-snippets Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
.. code-block :: java
2
2
3
- MongoCredential credential = MongoCredential . createPlainCredential(< db_username > , " $external" , < db_password> );
3
+ MongoCredential credential = MongoCredential . createPlainCredential(< username > , " $external" , < db_password> );
4
4
5
5
MongoClient mongoClient = MongoClients . create(
6
6
MongoClientSettings . builder()
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ Code Placeholders
34
34
35
35
The code examples on this page use the following placeholders:
36
36
37
- - ``<db_username >``: Your LDAP username.
38
- - ``<db_password >``: Your LDAP password.
37
+ - ``<username >``: Your LDAP username.
38
+ - ``<password >``: Your LDAP password.
39
39
- ``<hostname>``: The network address of your MongoDB deployment.
40
40
- ``<port>``: The port number of your MongoDB deployment. If you omit this parameter,
41
41
the driver uses the default port number (``27017``). You don't need to specify a port
@@ -70,7 +70,7 @@ mechanism:
70
70
71
71
.. code-block:: java
72
72
73
- MongoClient mongoClient = MongoClients.create("<db_username >:<db_password >@<hostname>:<port>/?authSource=$external&authMechanism=PLAIN");
73
+ MongoClient mongoClient = MongoClients.create("<username >:<password >@<hostname>:<port>/?authSource=$external&authMechanism=PLAIN");
74
74
75
75
.. tab::
76
76
:tabid: MongoCredential
You can’t perform that action at this time.
0 commit comments