diff --git a/config/config.sample.php b/config/config.sample.php index c6fab26665dc7..288ea7e4a9b2f 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -376,7 +376,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 3a15ba006d461..ea1e5484dda7b 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); }