Skip to main content
Module

x/denomongo_unittest_utils/deps.ts>CreateUserOptions

Unittest utilities for deno_mongo
Latest
interface CreateUserOptions
import { type CreateUserOptions } from "https://deno.land/x/denomongo_unittest_utils@v0.5.3/deps.ts";

Properties

optional
username: string

The name of the new user.

optional
password: string

The user’s password. The pwd field is not required if you run createUser on the $external database to create users who have credentials stored externally to MongoDB.

optional
customData: Document

Optional. Any arbitrary information. This field can be used to store any data an admin wishes to associate with this particular user. For example, this could be the user’s full name or employee id.

optional
roles: (string | { role: string; db: string; })[]

The roles granted to the user. Can specify an empty array [] to create users without roles.

optional
digestPassword: boolean

Optional. Indicates whether the server or the client digests the password. See https://docs.mongodb.com/manual/reference/command/createUser/#dbcmd.createUser

optional
writeConcern: Document

Optional. The level of write concern for the creation operation. The writeConcern document takes the same fields as the getLastError command.

optional
authenticationRestrictions: Document[]

Optional. The authentication restrictions the server enforces on the created user. Specifies a list of IP addresses and CIDR ranges from which the user is allowed to connect to the server or from which the server can accept users.

optional
mechanisms: ("SCRAM-SHA-1" | "SCRAM-SHA-256")[]

Optional. Specify the specific SCRAM mechanism or mechanisms for creating SCRAM user credentials.

optional
comment: Document

Optional. A user-provided comment to attach to this command.