diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-03-21 11:56:33 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-03-21 11:56:33 +0100 |
commit | 9457bf88079a23d28011ff7c65faa56a548b7817 (patch) | |
tree | f4507aa5ad04b7fca4ab49acee5aa97c6c962f6c /server.js | |
parent | 233d12d8b1916eae5bae230dc965045adb89a173 (diff) | |
download | PeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.tar.gz PeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.tar.zst PeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.zip |
OAuth server: first draft
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -119,6 +119,14 @@ app.use(function (err, req, res, next) { | |||
119 | res.sendStatus(err.status || 500) | 119 | res.sendStatus(err.status || 500) |
120 | }) | 120 | }) |
121 | 121 | ||
122 | // TODO: move into initializer | ||
123 | require('./server/models/users').createClient('coucou', [ 'password' ], function (err, id) { | ||
124 | if (err) throw err | ||
125 | logger.info('Client id: ' + id) | ||
126 | |||
127 | require('./server/models/users').createUser('floflo', 'coucou', function () {}) | ||
128 | }) | ||
129 | |||
122 | // ----------- Create the certificates if they don't already exist ----------- | 130 | // ----------- Create the certificates if they don't already exist ----------- |
123 | peertubeCrypto.createCertsIfNotExist(function (err) { | 131 | peertubeCrypto.createCertsIfNotExist(function (err) { |
124 | if (err) throw err | 132 | if (err) throw err |