feat: completed tasks for grade 4
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-11-22 14:40:35 +03:00
parent 0b97f77d76
commit e0263ba902
42 changed files with 5257 additions and 523 deletions
+5
View File
@@ -45,6 +45,11 @@ async def create_session(
if not await security.verify_password(password, user.password_hash):
raise unauthorized_basic()
if security.password_needs_rehash(user.password_hash):
replacement = await security.hash_password(password)
await users_storage.replace_password_hash(session, user.id, user.password_hash, replacement)
await session.commit()
token = security.generate_token()
expires_at = datetime.now(UTC) + timedelta(seconds=ttl_seconds)
await sessions_storage.create_session(