Add comprehensive backend features and mobile UI improvements
Backend: - Add 2FA authentication with TOTP support - Add API keys management system - Add audit logging for security events - Add file upload/management system - Add notifications system with preferences - Add session management - Add webhooks integration - Add analytics endpoints - Add export functionality - Add password policy enforcement - Add new database migrations for core tables Frontend: - Add module position system (top/bottom sidebar sections) - Add search and notifications module configuration tabs - Add mobile logo replacing hamburger menu - Center page title absolutely when no tabs present - Align sidebar footer toggles with navigation items - Add lighter icon color in dark theme for mobile - Add API keys management page - Add notifications page with context - Add admin analytics and audit logs pages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,15 @@ class Token(BaseModel):
|
||||
token_type: str = "bearer"
|
||||
|
||||
|
||||
class TokenWith2FA(BaseModel):
|
||||
"""JWT token response with 2FA requirement indicator."""
|
||||
|
||||
access_token: Optional[str] = None
|
||||
token_type: str = "bearer"
|
||||
requires_2fa: bool = False
|
||||
temp_token: Optional[str] = None # Temporary token for 2FA verification
|
||||
|
||||
|
||||
class TokenData(BaseModel):
|
||||
"""Token payload data schema."""
|
||||
|
||||
@@ -22,6 +31,14 @@ class LoginRequest(BaseModel):
|
||||
|
||||
username: str = Field(..., min_length=3, max_length=100)
|
||||
password: str = Field(..., min_length=1)
|
||||
totp_code: Optional[str] = Field(None, min_length=6, max_length=8) # 6 digits or 8-char backup code
|
||||
|
||||
|
||||
class Verify2FARequest(BaseModel):
|
||||
"""2FA verification request schema."""
|
||||
|
||||
temp_token: str
|
||||
code: str = Field(..., min_length=6, max_length=8)
|
||||
|
||||
|
||||
class RegisterRequest(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user