1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

OAuth server: first draft

This commit is contained in:
Chocobozzz 2016-03-21 11:56:33 +01:00
parent 233d12d8b1
commit 9457bf8807
6 changed files with 154 additions and 2 deletions

View file

@ -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