perf(shared-nestjs-auth): local JWKS verification instead of HTTP call

Replace HTTP POST to /api/v1/auth/validate with local JWT verification
using jose + createRemoteJWKSet. Eliminates ~5-20ms HTTP roundtrip per
API request across all backends. JWKS cached automatically by jose.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-25 08:57:24 +01:00
parent 1052469397
commit cacf8d7cc1
3 changed files with 63 additions and 25 deletions

View file

@ -13,6 +13,9 @@
"files": [
"dist"
],
"dependencies": {
"jose": "^5.0.0"
},
"peerDependencies": {
"@nestjs/common": "^10.0.0 || ^11.0.0",
"@nestjs/config": "^3.0.0 || ^4.0.0"