lib/authorizer/index.js
function (Handler, name) {
        if (!_.isFunction(Handler.init)) {
            throw new Error('The handler for "' + name + '" does not have an "init" function, which is necessary');
        }

        if (!_.isFunction(Handler.pre)) {
            throw new Error('The handler for "' + name + '" does not have a "pre" function, which is necessary');
        }

        if (!_.isFunction(Handler.post)) {
            throw new Error('The handler for "' + name + '" does not have a "post" function, which is necessary');
        }

        if (!_.isFunction(Handler.sign)) {
            throw new Error('The handler for "' + name + '" does not have a "sign" function, which is necessary');
        }

        Object.defineProperty(Handler, AUTH_TYPE_PROP, {
            value: name,
            configurable: false,
            enumerable: false,
            writable: false
        });

        AuthLoader.handlers[name] = Handler;
    }
function (Handler, name) {
        if (!_.isFunction(Handler.init)) {
            throw new Error('The handler for "' + name + '" does not have an "init" function, which is necessary');
        }

        if (!_.isFunction(Handler.pre)) {
            throw new Error('The handler for "' + name + '" does not have a "pre" function, which is necessary');
        }

        if (!_.isFunction(Handler.post)) {
            throw new Error('The handler for "' + name + '" does not have a "post" function, which is necessary');
        }

        if (!_.isFunction(Handler.sign)) {
            throw new Error('The handler for "' + name + '" does not have a "sign" function, which is necessary');
        }

        Object.defineProperty(Handler, AUTH_TYPE_PROP, {
            value: name,
            configurable: false,
            enumerable: false,
            writable: false
        });

        AuthLoader.handlers[name] = Handler;
    }
function ( Handler , name ) { if ( ! _ . isFunction ( Handler . init ) ) { throw new Error ( 'The handler for "' + name + '" does not have an "init" function, which is necessary' ) ; } if ( ! _ . isFunction ( Handler . pre ) ) { throw new Error ( 'The handler for "' + name + '" does not have a "pre" function, which is necessary' ) ; } if ( ! _ . isFunction ( Handler . post ) ) { throw new Error ( 'The handler for "' + name + '" does not have a "post" function, which is necessary' ) ; } if ( ! _ . isFunction ( Handler . sign ) ) { throw new Error ( 'The handler for "' + name + '" does not have a "sign" function, which is necessary' ) ; } Object . defineProperty ( Handler , AUTH_TYPE_PROP , { value : name , configurable : false , enumerable : false , writable : false } ) ; AuthLoader . handlers [ name ] = Handler ; }
Adds a Handler for use with given Auth type.

@param Handler
@param name
Adds a Handler for use with given Auth type .