<commit_before>'use strict';

/*
 * Defining the Package
 */

var mean = require('meanio');

var Module = mean.Module;
var Auth = new Module('mean-auth');

var passport = require('passport');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
Auth.register(function(app, database) {

    //We enable routing. By default the Package Object is passed to the routes
    Auth.routes(app, passport, database);

    mean.events.on('modulesFound', function() {
        require('./server/config/passport')(passport);

        // Register passport dependency
        mean.register('passport', function() {
            return passport;
        });
        // Register auth dependency
        mean.register('authorization', function() {
            // This needs to be replaced with proper package middleware handling.
            return require('./server/routes/middlewares/authorization');
        });

        // Use passport session
        app.use(passport.initialize());<commit_msg>cleanup app<commit_after>'use strict';

/*
 * Defining the Package
 */

var mean = require('meanio');

var Module = mean.Module;
var Auth = new Module('mean-auth');

var passport = require('passport');

/*
 * All MEAN packages require registration
 * Dependency injection is used to define required modules
 */
Auth.register(function(app) {

    //We enable routing. By default the Package Object is passed to the routes
    Auth.routes(app, passport);

    Auth.angularDependencies(['mean.auth']);
    
    mean.events.on('modulesFound', function() {
        require('./server/config/passport')(passport);

        // Register passport dependency
        mean.register('passport', function() {
            return passport;
        });
        // Register auth dependency
        mean.register('auth', function() {
            // This needs to be replaced with proper package middleware handling.
            return require('./server/routes/middlewares/authorization');
        });

        // Use passport session
        app.use(passport.initialize());
{'fraction_non_alphanumeric': 0.12111057922450934, 'fraction_numerical': 0.0, 'mean_word_length': 2.8, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '147338', 'n_tokens_mistral': 535, 'n_tokens_neox': 515, 'n_words': 159}