mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #45026 from nextcloud/fix/token-update
Avoid updating the same oc_authtoken row twice
This commit is contained in:
commit
fe7217d2d3
2 changed files with 3 additions and 1 deletions
|
|
@ -376,7 +376,7 @@ $CONFIG = [
|
|||
* Tokens are still checked every 5 minutes for validity
|
||||
* max value: 300
|
||||
*
|
||||
* Defaults to ``300``
|
||||
* Defaults to ``60``
|
||||
*/
|
||||
'token_auth_activity_update' => 60,
|
||||
|
||||
|
|
|
|||
|
|
@ -308,6 +308,8 @@ class PublicKeyTokenProvider implements IProvider {
|
|||
if (!($token instanceof PublicKeyToken)) {
|
||||
throw new InvalidTokenException("Invalid token type");
|
||||
}
|
||||
$now = $this->time->getTime();
|
||||
$token->setLastActivity($now);
|
||||
$this->mapper->update($token);
|
||||
$this->cacheToken($token);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue