feat: Update API token handling to use API-TOKEN header and improve related tests

This commit is contained in:
JSC
2025-07-27 22:15:23 +02:00
parent 3dc21337f9
commit 58030914e6
5 changed files with 80 additions and 85 deletions

View File

@@ -11,7 +11,9 @@ class UserRegisterRequest(BaseModel):
email: EmailStr = Field(..., description="User email address")
password: str = Field(
..., min_length=8, description="User password (minimum 8 characters)",
...,
min_length=8,
description="User password (minimum 8 characters)",
)
name: str = Field(..., min_length=1, max_length=100, description="User full name")
@@ -68,7 +70,7 @@ class ApiTokenResponse(BaseModel):
"""Schema for API token response."""
api_token: str = Field(..., description="Generated API token")
expires_at: datetime = Field(..., description="Token expiration timestamp")
expires_at: datetime | None = Field(None, description="Token expiration timestamp")
class ApiTokenStatusResponse(BaseModel):