Metadata-Version: 2.4
Name: yajvendra-prac7
Version: 0.1.0
Summary: Practical 7: Secure state management with FastAPI sessions, cookies, and pwdlib password hashing
Author-email: Yajvendra <yajvendra@example.com>
Keywords: fastapi,security,sessions,cookies,password-hashing,practical7
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Security
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.20.0
Requires-Dist: itsdangerous>=2.0.0
Requires-Dist: pwdlib[argon2]>=0.2.0

# Practical 7: Secure State Management Workflows

This package implements **Practical 7**:
> *Implementing secure state management workflows utilizing server-side sessions, browser cookies, and encrypted password hashing configurations.*

---

## 🚀 How to Install on Any Machine via Pip

```bash
pip install yajvendra-prac7
```

---

## ⚡ How to Get and Use the Code on Any System

### 1. Export the Complete Practical Code File (Recommended)
Run:
```bash
prac7 --get
```
or simply:
```bash
prac7 get
```
This instantly generates `practical7_secure_auth.py` in your current working directory!

### 2. Run Automated Verification Workflow
```bash
prac7
```
Simulates the entire workflow:
- User Registration (Password salted & hashed using PBKDF2:SHA256)
- Unauthorized Route Access Rejection (401)
- User Login & Server-Side Session Generation
- Secure Cookie Configuration (HttpOnly, SameSite, Secure)
- Authorized State Access
- User Logout & Session Invalidation
- Post-Logout Access Verification

### 3. Start Live Authentication Server
```bash
prac7 --server
```
Launches server on `http://127.0.0.1:5001`.

### 4. Print Full Source Code to Terminal
```bash
prac7 --show
```

---

## 🛠️ How to Build and Upload to PyPI

1. **Navigate to this folder:**
   ```bash
   cd practical7_secure_state_management
   ```

2. **Build the package:**
   ```bash
   python -m build
   ```

3. **Upload to PyPI:**
   ```bash
   twine upload dist/*
   ```
