Skip to content

DOCS-3159 - added mechanism option to db.auth() for 2.6 change. #1966

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

Closed
wants to merge 1 commit into from
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