Avoid updating the same oc_authtoken row twicepull/45355/head
@@ -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); | |||
} |