mongodb-memory-server-core
    Preparing search index...

    Interface CreateUserMongoDB

    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) as of 6.7.0

    interface CreateUserMongoDB {
        authenticationRestrictions?: {
            clientSource?: string;
            serverAddress?: string;
        }[];
        createUser: string;
        customData?: { [key: string]: any };
        digestPassword?: boolean;
        mechanisms?: ("SCRAM-SHA-1" | "SCRAM-SHA-256")[];
        pwd: string;
        roles: string | string[] | RoleSpecification | RoleSpecification[];
    }

    Hierarchy (View Summary)

    Index

    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.

    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.

    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: string | string[] | RoleSpecification | RoleSpecification[]

    The Roles for the user, can be an empty array