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 11.. code-block :: java
22
3- MongoCredential credential = MongoCredential . createPlainCredential(< db_username > , " $external" , < db_password> );
3+ MongoCredential credential = MongoCredential . createPlainCredential(< username > , " $external" , < db_password> );
44
55 MongoClient mongoClient = MongoClients . create(
66 MongoClientSettings . builder()
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ Code Placeholders
3434
3535The code examples on this page use the following placeholders:
3636
37- - ``<db_username >``: Your LDAP username.
38- - ``<db_password >``: Your LDAP password.
37+ - ``<username >``: Your LDAP username.
38+ - ``<password >``: Your LDAP password.
3939- ``<hostname>``: The network address of your MongoDB deployment.
4040- ``<port>``: The port number of your MongoDB deployment. If you omit this parameter,
4141 the driver uses the default port number (``27017``). You don't need to specify a port
@@ -70,7 +70,7 @@ mechanism:
7070
7171 .. code-block:: java
7272
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");
7474
7575 .. tab::
7676 :tabid: MongoCredential
You can’t perform that action at this time.
0 commit comments