feat: перенос core логиги

This commit is contained in:
Enterxx2
2026-11-24 00:49:06 +03:00
parent 20afc2c790
commit 4829fc7b4e
156 changed files with 11093 additions and 27 deletions
+15
View File
@@ -0,0 +1,15 @@
from fastapi import Depends
from domain import UserSchema
from infrastructure.dependencies import ServiceCreator
from infrastructure.services import AuthService
from .security import bearer_token
async def get_current_user(
token: str | None = Depends(bearer_token),
service: AuthService = Depends(ServiceCreator.get_auth_service),
) -> UserSchema:
"""Владелец действующей Bearer-сессии; X-User-Id не учитывается; иначе 401"""
return await service.authenticate(token)