Factory method building a scoped RbacRequestContext helper for controllers and templates.
Current user context (or null for anonymous guest).
RbacRequestContext instance.
Normalizes the target URI and HTTP method from the Express-like request.
The Express-like request.
Object containing the normalized URI and HTTP method.
Extracts the authenticated user context from the Express-like request.
The Express-like request.
The resolved RbacUserContext or null if unauthenticated.
Generates a standard JSON response when access is denied.
The Express-like request.
The Express-like response.
Denial rationale ('unauthenticated' | 'forbidden' | 'tarpit_blocked').
Generates standard Express middleware handler function.
Express middleware implementing Quatrain RBAC route guards, FLS context injection and tarpit delays.