UNPKG

joola.io.engine

Version:
26 lines (24 loc) 755 B
/** * joola.io * * Copyright Joola Smart Solutions, Ltd. <info@joo.la> * * Licensed under GNU General Public License 3.0 or later. * Some rights reserved. See LICENSE, AUTHORS. * * @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+> */ var joola = global.joola, //for jslint ce = require('cloneextend'), _datatables = require('../objects/datatables'), connector = require('../connectors/connector'); exports.login = function (username, password, next) { var user = joola.config.auth.organizations[0].users[joola.config.auth.organizations[0].users.length - 1]; if (user) { joola.logger.info('Joola authentication success [' + username + ']...'); return next(user); } else throw new Error('No users found.'); };