Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 9 additions & 0 deletions source/reference/method/db.auth-param.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,13 @@ name: password
type: string
position: 2
description: "Specifies the corresponding password."
---
field:
optional: true
type: param
default: MONGODB-CR
name: mechanism
type: string
position: 3
description: "Specifies the authentication mechanism used. Defaults to ``MONGODB-CR``. ``PLAIN`` is used for :doc:`SASL/LDAP authentication </tutorial/configure-ldap-sasl-openldap>`, available only in MongoDB Enterprise."
...
10 changes: 7 additions & 3 deletions source/reference/method/db.auth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ Definition

.. include:: /reference/method/db.auth-param.rst

Alternatively, you can use :option:`mongo --username` and
:option:`--password <mongo --password>` to specify authentication
credentials.
Alternatively, you can use :option:`mongo --username`,
:option:`--password <mongo --password>`, and
:option:`--authenticationMechanism <mongo --authenticationMechanism>`
to specify authentication credentials.

:option:`--authenticationMechanism <mongo --authenticationMechanism>`
supports additional mechanisms not available when using :method:`db.auth()`.

.. |operation-name| replace:: :method:`db.auth()`
.. include:: /includes/note-auth-methods-excluded-from-shell-history.rst
Expand Down