Spaces:
Runtime error
Runtime error
Commit History
-
deploy: update
ad279fb
-
Add auth, credential encryption, and session ownership (Items 3, 5, 6)
Item 3 – Authentication: - backend/core/auth.py: create_access_token() + verify_token() dependency (JWT/PyJWT) - backend/app/api/routes/auth.py: POST /auth/login, GET /auth/me (public) - backend/main.py: all API routers now protected with Depends(verify_token) - Config: AUTH_USERNAME, AUTH_PASSWORD, JWT_SECRET, JWT_EXPIRE_HOURS - Frontend: token stored in module memory (never localStorage); axios request interceptor adds Authorization header; 401 broadcasts auth:logout event - LoginPage.jsx: themed sign-in card shown before app loads - App.jsx: guards main app behind isAuthenticated state Item 5 – Credential encryption: - backend/core/crypto.py: encrypt_credentials()/decrypt_credentials() via Fernet - Transparent backwards-compat: legacy plaintext dicts pass through unchanged - specs.py: encrypts on save, decrypts on GET /credentials and GET /specs/:id - execution.py: decrypts stored creds before passing to LLM planner and executor - Config: ENCRYPTION_KEY (Fernet key, optional — wa…098f3ea