8000 DOCSP-48713 Update non-MongoDB credentials by lindseymoore · Pull Request #676 · mongodb/docs-java · GitHub
[go: up one dir, main page]

Skip to content

DOCSP-48713 Update non-MongoDB credentials #676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
DOCSP-48713 Update non-MongoDB credentials
  • Loading branch information
lindseymoore committed Apr 23, 2025
commit d72522d80e109f2e69e785a97a18cbed394f650e
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. code-block:: java

MongoCredential credential = MongoCredential.createPlainCredential(<db_username>, "$external", <db_password>);
MongoCredential credential = MongoCredential.createPlainCredential(<username>, "$external", <db_password>);

MongoClient mongoClient = MongoClients.create(
MongoClientSettings.builder()
Expand Down
6 changes: 3 additions & 3 deletions source/security/auth/ldap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Code Placeholders

The code examples on this page use the following placeholders:

- ``<db_username>``: Your LDAP username.
- ``<db_password>``: Your LDAP password.
- ``<username>``: Your LDAP username.
- ``<password>``: Your LDAP password.
- ``<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 to specify a port
Expand Down Expand Up @@ -70,7 +70,7 @@ mechanism:

.. code-block:: java

MongoClient mongoClient = MongoClients.create("<db_username>:<db_password>@<hostname>:<port>/?authSource=$external&authMechanism=PLAIN");
MongoClient mongoClient = MongoClients.create("<username>:<password>@<hostname>:<port>/?authSource=$external&authMechanism=PLAIN");

.. tab::
:tabid: MongoCredential
Expand Down
Loading
0