diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-07-20 16:23:58 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-07-20 16:23:58 +0200 |
commit | 2f372a865487427ff97ad17edd0e6adfbb478c80 (patch) | |
tree | 84e8b2ba2240e83dcdeeb057579327b0a663974b /server/middlewares/oauth.js | |
parent | 66698b833f77806045b36fdeba612acda43dd7f7 (diff) | |
download | PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.tar.gz PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.tar.zst PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.zip |
Server: implement refresh token
Diffstat (limited to 'server/middlewares/oauth.js')
-rw-r--r-- | server/middlewares/oauth.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/middlewares/oauth.js b/server/middlewares/oauth.js index 3d7429f1d..91a990509 100644 --- a/server/middlewares/oauth.js +++ b/server/middlewares/oauth.js | |||
@@ -2,9 +2,12 @@ | |||
2 | 2 | ||
3 | const OAuthServer = require('express-oauth-server') | 3 | const OAuthServer = require('express-oauth-server') |
4 | 4 | ||
5 | const constants = require('../initializers/constants') | ||
5 | const logger = require('../helpers/logger') | 6 | const logger = require('../helpers/logger') |
6 | 7 | ||
7 | const oAuthServer = new OAuthServer({ | 8 | const oAuthServer = new OAuthServer({ |
9 | accessTokenLifetime: constants.OAUTH_LIFETIME.ACCESS_TOKEN, | ||
10 | refreshTokenLifetime: constants.OAUTH_LIFETIME.REFRESH_TOKEN, | ||
8 | model: require('../lib/oauth-model') | 11 | model: require('../lib/oauth-model') |
9 | }) | 12 | }) |
10 | 13 | ||