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/middlewares | |
parent | 233d12d8b1916eae5bae230dc965045adb89a173 (diff) | |
download | PeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.tar.gz PeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.tar.zst PeerTube-9457bf88079a23d28011ff7c65faa56a548b7817.zip |
OAuth server: first draft
Diffstat (limited to 'server/middlewares')
-rw-r--r-- | server/middlewares/oauth2.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/middlewares/oauth2.js b/server/middlewares/oauth2.js new file mode 100644 index 000000000..a1fa61fbb --- /dev/null +++ b/server/middlewares/oauth2.js | |||
@@ -0,0 +1,11 @@ | |||
1 | 'use strict' | ||
2 | |||
3 | const OAuthServer = require('express-oauth-server') | ||
4 | |||
5 | const oAuth2 = new OAuthServer({ | ||
6 | model: require('../models/users') | ||
7 | }) | ||
8 | |||
9 | // --------------------------------------------------------------------------- | ||
10 | |||
11 | module.exports = oAuth2 | ||