]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(ocpp2): integrate InMemoryAuthCache into auth service
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 18 Nov 2025 18:20:29 +0000 (19:20 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 18 Nov 2025 18:20:29 +0000 (19:20 +0100)
commitf42be9ff42807507590fe8cf9a01c4db3f73a967
treee8461e844c8e805d1591f4e1f4291e69bd9b0a9b
parentaee1e3db9b3d277c43a10e1cbb14ada1622f116f
refactor(ocpp2): integrate InMemoryAuthCache into auth service

Update factory, interfaces, and service to support cache integration:
- AuthComponentFactory.createAuthCache() now instantiates InMemoryAuthCache
- Add evictions field to CacheStats interface
- Add rateLimit field to AuthStats interface (blockedRequests, rateLimitedIdentifiers, totalChecks)
- Make OCPPAuthServiceImpl.getStats() async to fetch cache stats from strategies
- Update factory test to expect cache instance

Enables monitoring of cache evictions and rate limiting events.
src/charging-station/ocpp/auth/factories/AuthComponentFactory.ts
src/charging-station/ocpp/auth/interfaces/OCPPAuthService.ts
src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts
tests/charging-station/ocpp/auth/factories/AuthComponentFactory.test.ts