Authentication身份验证

These guides show you how to authenticate to a MongoDB instance using the Node.js driver.这些指南向您展示了如何使用Node.js驱动程序对MongoDB实例进行身份验证。

The Authentication Mechanisms guide contains sample connection code using each authentication mechanism supported in the MongoDB Community Edition which includes:身份验证机制指南包含使用MongoDB社区版支持的每个身份验证机制的连接代码示例,其中包括:

  • DEFAULT
  • SCRAM-SHA-256
  • SCRAM-SHA-1
  • MONGODB-CR
  • MONGODB-AWS
  • X.509

The Enterprise Authentication Mechanisms guide contains sample connection code using authentication mechanisms available only in MongoDB Enterprise Edition which includes:企业身份验证机制指南包含使用仅在MongoDB Enterprise Edition中提供的身份验证机制的示例连接代码,其中包括:

  • Kerberos (GSSAPI/SSPI)
  • LDAP (PLAIN)
Note

For instructions on MongoDB driver installation and deployment setup, see our Connect to MongoDB guide. 有关MongoDB驱动程序安装和部署设置的说明,请参阅连接到MongoDB指南。Select your MongoDB deployment type and the Node.js client.选择MongoDB部署类型和Node.js客户端。