mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Server: implement refresh token
This commit is contained in:
parent
66698b833f
commit
2f372a8654
9 changed files with 78 additions and 23 deletions
|
@ -11,8 +11,8 @@ const OAuthClientSchema = mongoose.Schema({
|
|||
OAuthClientSchema.path('clientSecret').required(true)
|
||||
|
||||
OAuthClientSchema.statics = {
|
||||
getByIdAndSecret: getByIdAndSecret,
|
||||
list: list,
|
||||
loadByIdAndSecret: loadByIdAndSecret,
|
||||
loadFirstClient: loadFirstClient
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,6 @@ function loadFirstClient (callback) {
|
|||
return this.findOne({}, callback)
|
||||
}
|
||||
|
||||
function loadByIdAndSecret (id, clientSecret) {
|
||||
function getByIdAndSecret (id, clientSecret) {
|
||||
return this.findOne({ _id: id, clientSecret: clientSecret })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue