br-audit-enrichment
Installation
SKILL.md
Better Route audit enrichment
Run authentication first, enrichment second, and audit logging around the downstream handler.
use BetterRoute\Middleware\Audit\AuditEnricherMiddleware;
use BetterRoute\Middleware\Audit\AuditMiddleware;
$router->middleware([
$auth,
new AuditEnricherMiddleware(
staticFields: ['resource' => 'account', 'action' => 'update'],
clientIpResolver: $trustedProxyResolver,
includeClientIp: true
),
new AuditMiddleware($logger),
]);