Add authentication and idempotency middleware, implement graceful shutdown, and update dependencies
- Introduced `authMiddleware` for request authentication and `optionalAuthMiddleware` for optional authentication. - Added `idempotencyMiddleware` to ensure idempotent requests are processed correctly, including Redis caching. - Implemented graceful shutdown for the REST API server to close Redis connections on termination signals. - Updated `package.json` to include `jsonwebtoken` and its type definitions.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
"helmet": "^7.1.0",
|
||||
"ethers": "^6.9.0",
|
||||
"redis": "^4.6.12",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"@emoney/validation": "workspace:*",
|
||||
"@emoney/blockchain": "workspace:*",
|
||||
"@emoney/auth": "workspace:*",
|
||||
@@ -25,6 +26,7 @@
|
||||
"@types/express": "^4.17.21",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/node": "^20.10.0",
|
||||
"@types/jsonwebtoken": "^9.0.5",
|
||||
"typescript": "^5.3.0",
|
||||
"ts-node-dev": "^2.0.0",
|
||||
"jest": "^29.7.0",
|
||||
|
||||
Reference in New Issue
Block a user