cf7c29639c
Backend: config/db/security/logging core, SQLAlchemy models (Server, Credential, UpdateJob, UpdateLog, AuditLog, User), services (winrm, ssh, cau, audit, job_runner), REST API (auth, servers, updates, audit), Socket.io WebSocket layer. Frontend: Vue 3 + TS + Pinia + Tailwind, Views (Dashboard, Servers, Updates, Audit, Login), axios + socket.io-client, nginx prod config.
23 lines
416 B
Python
23 lines
416 B
Python
"""Auth schemas."""
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class LoginRequest(BaseModel):
|
|
username: str = Field(min_length=1)
|
|
password: str = Field(min_length=1)
|
|
|
|
|
|
class TokenResponse(BaseModel):
|
|
access_token: str
|
|
token_type: str = "bearer"
|
|
expires_in: int # seconds
|
|
|
|
|
|
class UserRead(BaseModel):
|
|
id: int
|
|
username: str
|
|
email: str | None
|
|
full_name: str | None
|
|
is_admin: bool
|