Skip to main content

Module middleware

Module middleware 

Source

Re-exports§

pub use scope_guard::AcpScope;
pub use scope_guard::ScopeGuard;
pub use scope_guard::ScopeGuardError;
pub use community_access_guard::CommunityAccessGuard;

Modules§

community_access_guard
community_access_guard middleware — Story 5.5 (refonte UX multi-rôle ACP).
scope_guard
scope_guard middleware — Story 1.3 (refonte UX multi-rôle ACP).

Structs§

AuthenticatedUser
Authenticated user claims extracted from JWT token
ConcurrencyLimitConfig
Configuration for RequestConcurrencyLimit.
GdprRateLimit
GDPR-specific rate limiting middleware
GdprRateLimitConfig
Configuration for GDPR rate limiting
GdprRateLimitMiddleware
GdprRateLimitState
Rate limit state tracking
OrganizationId
Organization ID extracted from authenticated user’s JWT token
RequestConcurrencyLimit
Load-shedding middleware: bounds the number of requests in flight and rejects the excess with an explicit 429 Too Many Requests + Retry-After, instead of letting them queue silently on the DB pool until a client timeout or an upstream 502 (see module docs above).
RequestConcurrencyLimitMiddleware

Constants§

DEFAULT_MAX_CONCURRENT_REQUESTS
Conservative starting point: comfortably above the sqlx pool’s max_connections default (10, cf. DB_POOL_MAX_CONNECTIONS) since a single request typically issues several short, sequential queries rather than holding one connection for its whole lifetime — see unit_repository_impl.rs, which acquires per-call via &self.pool.