feat(schemas): T17 add Pydantic auth schemas

Add authentication schemas for user registration and login:
- UserRegister: email, password (with strength validation), password_confirm
- UserLogin: email, password
- UserResponse: id, email, created_at, is_active (orm_mode=True)
- TokenResponse: access_token, token_type, expires_in
- TokenData: user_id, exp

Includes field validators for password strength and password confirmation matching.

Test coverage: 19 tests for all schemas
This commit is contained in:
Luca Sacchi Ricciardi
2026-04-07 13:52:33 +02:00
parent a698d09a77
commit 02473bc39e
7 changed files with 1341 additions and 5 deletions

View File

@@ -0,0 +1,16 @@
"""Schemas package for OpenRouter Monitor."""
from openrouter_monitor.schemas.auth import (
TokenData,
TokenResponse,
UserLogin,
UserRegister,
UserResponse,
)
__all__ = [
"UserRegister",
"UserLogin",
"UserResponse",
"TokenResponse",
"TokenData",
]