Compare commits

...

3 Commits

Author SHA1 Message Date
Julius Härtl 32bee4ac9a
Merge 8ec8d74eb9 into acf8ea1761 2024-04-26 11:27:15 -04:00
Julius Härtl 8ec8d74eb9
fix: Always set last activity if we update the row of an authtoken anyways
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-04-25 10:07:54 +02:00
Julius Härtl b9cbcdcb0a
docs: Update token_auth_activity_update default value to match implementation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-04-25 10:07:09 +02:00
2 changed files with 3 additions and 1 deletions

View File

@ -370,7 +370,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,

View File

@ -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);
}