Interface options for "db.createUser" (used for this package) This interface is WITHOUT the custom options from this package (Some text copied from https://docs.mongodb.com/manual/reference/method/db.createUser/#definition) This interface only exists, because mongodb dosnt provide such an interface for "createUser" (or as just very basic types)

Hierarchy

Properties

authenticationRestrictions?: {
    clientSource?: string;
    serverAddress?: string;
}[]

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.

Type declaration

  • Optional clientSource?: string
  • Optional serverAddress?: string
createUser: string

Username

customData?: {
    [key: string]: any;
}

Any arbitrary information. This field can be used to store any data an admin wishes to associate with this particular user.

Type declaration

  • [key: string]: any

Example

this could be the users full name or employee id.
digestPassword?: boolean

Indicates whether the server or the client digests the password. "true" - The Server digests the Password "false" - The Client digests the Password

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

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

pwd: string

Password

roles: undefined | string | string[] | RoleSpecification | RoleSpecification[]

The Roles for the user, can be an empty array

Generated using TypeDoc