Class MongoCredentials

A representation of the credentials used by MongoDBMongoDB使用的凭据的表示

Hierarchy

  • MongoCredentials

Constructors

Properties

mechanism: AuthMechanism

The method used to authenticate用于身份验证的方法

mechanismProperties: AuthMechanismProperties

Special properties used by some types of auth mechanisms某些类型的身份验证机制使用的特殊属性

password: string

The password used for authentication用于身份验证的密码

source: string

The database that the user should authenticate against用户应针对的数据库进行身份验证

username: string

The username used for authentication用于身份验证的用户名

Methods

  • If the authentication mechanism is set to "default", resolves the authMechanism based on the server version and server supported sasl mechanisms.如果身份验证机制设置为“默认”,则会根据服务器版本和服务器支持的sasl机制解析authMechanism。

    Parameters

    • Optional hello: Document

      A hello response from the server来自服务器的hello响应

    Returns MongoCredentials

Generated using TypeDoc