aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/oauth-client.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-07-20 16:23:58 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-07-20 16:23:58 +0200
commit2f372a865487427ff97ad17edd0e6adfbb478c80 (patch)
tree84e8b2ba2240e83dcdeeb057579327b0a663974b /server/models/oauth-client.js
parent66698b833f77806045b36fdeba612acda43dd7f7 (diff)
downloadPeerTube-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.js4
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({
11OAuthClientSchema.path('clientSecret').required(true) 11OAuthClientSchema.path('clientSecret').required(true)
12 12
13OAuthClientSchema.statics = { 13OAuthClientSchema.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
31function loadByIdAndSecret (id, clientSecret) { 31function getByIdAndSecret (id, clientSecret) {
32 return this.findOne({ _id: id, clientSecret: clientSecret }) 32 return this.findOne({ _id: id, clientSecret: clientSecret })
33} 33}