diff --git a/config/config.sample.php b/config/config.sample.php index f45e7dcc5e0f6..56849e4711526 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -370,7 +370,7 @@ * Tokens are still checked every 5 minutes for validity * max value: 300 * - * Defaults to ``300`` + * Defaults to ``60`` */ 'token_auth_activity_update' => 60, diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index 48a23b61e0b6d..eb3167acee3e0 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -308,6 +308,8 @@ public function updateToken(OCPIToken $token) { if (!($token instanceof PublicKeyToken)) { throw new InvalidTokenException("Invalid token type"); } + $now = $this->time->getTime(); + $token->setLastActivity($now); $this->mapper->update($token); $this->cacheToken($token); }