API 参考
    正在准备搜索索引...

    A representation of the credentials used by MongoDB

    索引

    构造函数

    属性

    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

    方法

    • Determines if two MongoCredentials objects are equivalent

      参数

      返回 boolean

    • If the authentication mechanism is set to "default", resolves the authMechanism based on the server version and server supported sasl mechanisms.

      参数

      • 可选hello: Document

        A hello response from the server

      返回 MongoCredentials

    • 返回 void