18 lines
413 B
Python
18 lines
413 B
Python
from datetime import datetime
|
|
from typing import Literal
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from app.schemas.user import User
|
|
|
|
|
|
class AuthSession(BaseModel):
|
|
"""Ответ POST /auth/sessions (в OpenAPI — Session)."""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
token: str = Field(min_length=32)
|
|
token_type: Literal["Bearer"] = "Bearer"
|
|
expires_at: datetime
|
|
user: User
|