добавлена аутентификация и сессии в redis

This commit is contained in:
2026-10-07 23:18:23 +03:00
parent 789bea2f1e
commit 7f8bcfd234
9 changed files with 389 additions and 114 deletions
+12
View File
@@ -18,6 +18,11 @@ class CreateUser(BaseModel):
max_length=100,
)
password: str = Field(
min_length=12,
max_length=128,
)
@field_validator("display_name")
@classmethod
def validate_display_name(cls, value: str) -> str:
@@ -34,6 +39,13 @@ class User(BaseModel):
created_at: datetime
class SessionResponse(BaseModel):
token: str
token_type: str
expires_at: datetime
user: User
class CreateChat(BaseModel):
model_config = ConfigDict(extra="forbid")