mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Add ability to customize token lifetime
This commit is contained in:
parent
518c5cc62d
commit
b65f5367ba
11 changed files with 229 additions and 195 deletions
|
@ -36,8 +36,8 @@ export class TokensCache {
|
|||
const token = this.userHavingToken.get(userId)
|
||||
|
||||
if (token !== undefined) {
|
||||
this.accessTokenCache.del(token)
|
||||
this.userHavingToken.del(userId)
|
||||
this.accessTokenCache.delete(token)
|
||||
this.userHavingToken.delete(userId)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,8 +45,8 @@ export class TokensCache {
|
|||
const tokenModel = this.accessTokenCache.get(token)
|
||||
|
||||
if (tokenModel !== undefined) {
|
||||
this.userHavingToken.del(tokenModel.userId)
|
||||
this.accessTokenCache.del(token)
|
||||
this.userHavingToken.delete(tokenModel.userId)
|
||||
this.accessTokenCache.delete(token)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue