From 9457bf88079a23d28011ff7c65faa56a548b7817 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 21 Mar 2016 11:56:33 +0100 Subject: OAuth server: first draft --- server.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server.js') diff --git a/server.js b/server.js index cf594453d..f9925eb24 100644 --- a/server.js +++ b/server.js @@ -119,6 +119,14 @@ app.use(function (err, req, res, next) { res.sendStatus(err.status || 500) }) +// TODO: move into initializer +require('./server/models/users').createClient('coucou', [ 'password' ], function (err, id) { + if (err) throw err + logger.info('Client id: ' + id) + + require('./server/models/users').createUser('floflo', 'coucou', function () {}) +}) + // ----------- Create the certificates if they don't already exist ----------- peertubeCrypto.createCertsIfNotExist(function (err) { if (err) throw err -- cgit v1.2.3