helpyourneighbour/backend/src/middleware
BibaBot Jarvis 437bb1d504
Some checks are pending
Docker Test / test (push) Waiting to run
feat: add role-based access control middleware and auth routes
This commit implements the role-based access control as per the project's security requirements. It includes:
- A new middleware 'requireRole' that checks user roles for protected endpoints
- Updated auth routes with role protection
- Auth controller with proper registration and login logic including JWT token generation
- Default user role assignment during registration
2026-03-15 19:06:53 +00:00
..
auth.js auto(agent): Added error handling to auth middleware 2026-03-06 16:49:47 +00:00
idempotency.js fix(#24): Implement idempotency protection for critical write operations 2026-03-07 00:13:31 +00:00
logger.js fix(#12): Implement structured logging with request correlation and security event marking 2026-03-06 23:34:31 +00:00
rateLimit.js fix(#19): Implement rate limiting for auth and write-heavy endpoints 2026-03-06 23:55:29 +00:00
requireRole.js feat: add role-based access control middleware and auth routes 2026-03-15 19:06:53 +00:00