aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-21 11:56:33 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-21 11:56:33 +0100
commit9457bf88079a23d28011ff7c65faa56a548b7817 (patch)
treef4507aa5ad04b7fca4ab49acee5aa97c6c962f6c /server.js
parent233d12d8b1916eae5bae230dc965045adb89a173 (diff)
downloadPeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.tar.gz
PeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.tar.zst
PeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.zip
OAuth server: first draft
Diffstat (limited to 'server.js')
-rw-r--r--server.js8
1 files changed, 8 insertions, 0 deletions
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) {
119 res.sendStatus(err.status || 500) 119 res.sendStatus(err.status || 500)
120}) 120})
121 121
122// TODO: move into initializer
123require('./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 -----------
123peertubeCrypto.createCertsIfNotExist(function (err) { 131peertubeCrypto.createCertsIfNotExist(function (err) {
124 if (err) throw err 132 if (err) throw err