feat: Update API token handling to use API-TOKEN header and improve related tests
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user