Support sliding login token expiration #27

Merged
brian merged 2 commits from support-sliding-login-token-expiration into main 2025-11-12 15:43:03 +01:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit a302dc51c6 - Show all commits
@@ -25,7 +25,7 @@ class InMemoryTokenRepository(TokenRepositoryInterface):
def verify(self, token: str) -> int | None:
"""Verify token and return user_id if valid, None otherwise.
Implements sliding expiration: extends token lifetime on each verification.
"""
if token not in self._tokens:
@@ -30,7 +30,7 @@ class RedisTokenRepository(TokenRepositoryInterface):
def verify(self, token: str) -> int | None:
"""Verify token and return user_id if valid, None otherwise.
Implements sliding expiration: extends token lifetime on verification.
"""
key = f"token:{token}"