<commit_before>"use strict";

// Load the libraries and modules

var config = {
    libraries: {
        bodyParser: require('body-parser'),
        underscore: require('underscore'),
        validator: require('validator')
    },
    directory: __dirname + '/modules/',
    modules: {
        npm: [
            [require('dragonnodejs-express'), {
                app: {
                    port: process.env.PORT
                },
                auth: {
                    disabled: process.env.AUTH_DISABLED,
                    users: process.env.AUTH_USERS,
                    user: process.env.AUTH_USER,
                    password: <PASSWORD>,
                    realm: process.env.AUTH_REALM
                },
                cors: {},
                header: {
                    'X-Powered-By': null
                }
            }],
            [require('dragonnodejs-mongodb'), {
                db: {
                    uri: process.env.MONGOLAB_URI || 'mongodb://127.0.0.1/sso-server?auto_reconnect=true',
                    options: { safe: true }
                },
                collections: {
                    users: [
                        [{ email: 1 }, { sparse: true, unique: true }]
                    ]
                }
            }]
        ],
        directory: {
            app: {},
            config: {
                route: '/',
                config: function () {
                    var pkg = require(__dirname + '/package.json');
                    return {
                        name: pkg.name,
                        version: pkg.version,
                        homepage: pkg.homepage
                    };
                }()
            },
            validate: function (validator) {
                return {
                    email: function (input) {
                        input = validator.trim(input);
                        if (!validator.isEmail(input)) {
                            throw new Error('invalid email');
                        }
                        return input;
                    },
                    password: function (input) {
                        input = validator.trim(input);
                        return input;
                    }
                };
            }
        }<commit_msg>Add the password and user modules<commit_after>"use strict";

// Load the libraries and modules

var config = {
    libraries: {
        bodyParser: require('body-parser'),
        underscore: require('underscore'),
        validator: require('validator')
    },
    directory: __dirname + '/modules/',
    modules: {
        npm: [
            [require('dragonnodejs-express'), {
                app: {
                    port: process.env.PORT
                },
                auth: {
                    disabled: process.env.AUTH_DISABLED,
                    users: process.env.AUTH_USERS,
                    user: process.env.AUTH_USER,
                    password: <PASSWORD>,
                    realm: process.env.AUTH_REALM
                },
                cors: {},
                header: {
                    'X-Powered-By': null
                }
            }],
            [require('dragonnodejs-mongodb'), {
                db: {
                    uri: process.env.MONGOLAB_URI || 'mongodb://127.0.0.1/sso-server?auto_reconnect=true',
                    options: { safe: true }
                },
                collections: {
                    users: [
                        [{ email: 1 }, { sparse: true, unique: true }]
                    ]
                }
            }]
        ],
        directory: {
            app: {},
            config: {
                route: '/',
                config: function () {
                    var pkg = require(__dirname + '/package.json');
                    return {
                        name: pkg.name,
                        version: pkg.version,
                        homepage: pkg.homepage
                    };
                }()
            },
            validate: function (validator) {
                return {
                    email: function (input) {
                        input = validator.trim(input);
                        if (!validator.isEmail(input)) {
                            throw new Error('invalid email');
                        }
                        return input;
                    },
                    password: function (input) {
                        input = validator.trim(input);
                        return input;
                    }
                };
            },
            password: {},
            user: {}
        }
{'fraction_non_alphanumeric': 0.10355156183140779, 'fraction_numerical': 0.002995293110825845, 'mean_word_length': 0.8347723704866562, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2685501', 'n_tokens_mistral': 1136, 'n_tokens_neox': 1034, 'n_words': 201}