update docs.

This commit is contained in:
Bryce
2025-08-09 21:04:21 -07:00
parent af637f29b4
commit d6635a42df
7 changed files with 484 additions and 86 deletions

View File

@@ -47,14 +47,14 @@ graph TB
The authentication blueprint handles all authentication-related routes and logic:
#### Routes
- `/login`: GET/POST - User login page and authentication
- `/signup`: GET/POST - User registration page and account creation
- `/logout`: GET - User logout and session termination
- `/auth/login`: GET/POST - User login page and authentication
- `/auth/signup`: GET/POST - User registration page and account creation
- `/auth/logout`: GET - User logout and session termination
#### Key Functions
- `login()`: Handles user authentication
- `signup()`: Manages user registration
- `logout()`: Terminates user sessions
- `login()`: Handles user authentication with form validation
- `signup()`: Manages user registration with server-side validation
- `logout()`: Terminates user sessions and clears authentication state
- `validate_password()`: Enforces password complexity requirements
### 2. User Model ([`app/models.py`](app/models.py:13))
@@ -288,6 +288,15 @@ login_manager.login_message = 'Please log in to access this page.'
### Blueprint Registration
The auth blueprint is registered with URL prefix `/auth/`:
```python
from app.auth import auth
app.register_blueprint(auth, url_prefix='/auth')
```
## Testing Strategy
### Unit Tests
#### Authentication Tests
@@ -350,4 +359,11 @@ login_manager.login_message_category = 'warning'
- Suspicious activity monitoring
- IP-based security checks
- IP-based security checks
### 6. Current Implementation Status
- User authentication with session management fully implemented
- Password complexity validation operational
- Server-side form validation complete
- Error handling with user-friendly messages
- Blueprint-based routing with proper URL prefixes
- Error handling with user-friendly messages
- Blueprint-based routing with proper URL prefixes