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/models/oauth-client.js | |
parent | 66698b833f77806045b36fdeba612acda43dd7f7 (diff) | |
download | PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.tar.gz PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.tar.zst PeerTube-2f372a865487427ff97ad17edd0e6adfbb478c80.zip |
Server: implement refresh token
Diffstat (limited to 'server/models/oauth-client.js')
-rw-r--r-- | server/models/oauth-client.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/oauth-client.js b/server/models/oauth-client.js index 048e5af48..830f68857 100644 --- a/server/models/oauth-client.js +++ b/server/models/oauth-client.js | |||
@@ -11,8 +11,8 @@ const OAuthClientSchema = mongoose.Schema({ | |||
11 | OAuthClientSchema.path('clientSecret').required(true) | 11 | OAuthClientSchema.path('clientSecret').required(true) |
12 | 12 | ||
13 | OAuthClientSchema.statics = { | 13 | OAuthClientSchema.statics = { |
14 | getByIdAndSecret: getByIdAndSecret, | ||
14 | list: list, | 15 | list: list, |
15 | loadByIdAndSecret: loadByIdAndSecret, | ||
16 | loadFirstClient: loadFirstClient | 16 | loadFirstClient: loadFirstClient |
17 | } | 17 | } |
18 | 18 | ||
@@ -28,6 +28,6 @@ function loadFirstClient (callback) { | |||
28 | return this.findOne({}, callback) | 28 | return this.findOne({}, callback) |
29 | } | 29 | } |
30 | 30 | ||
31 | function loadByIdAndSecret (id, clientSecret) { | 31 | function getByIdAndSecret (id, clientSecret) { |
32 | return this.findOne({ _id: id, clientSecret: clientSecret }) | 32 | return this.findOne({ _id: id, clientSecret: clientSecret }) |
33 | } | 33 | } |