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

    Interface CreateUser

    Interface options for "db.createUser" (used for this package) This interface is WITH the custom options from this package (Some text copied from https://docs.mongodb.com/manual/reference/method/db.createUser/#definition)

    interface CreateUser {
        authenticationRestrictions?: {
            clientSource?: string;
            serverAddress?: string;
        }[];
        createUser: string;
        customData?: { [key: string]: any };
        database?: string;
        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.
    
    database?: string

    In which Database to create this user in

    'admin' by default the "admin" database is used
    
    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