pub fn enforce_dispatch(
plan: &RouteSecurityPlan,
exchange: &Exchange,
) -> Result<(), CamelError>Expand description
Guard a dispatch against the route’s security plan.
A AccessMode::Public route passes through with no extraction and no
carrier requirement. Any non-Public route requires the carrier to be present
AND the carrier’s provider_id() to equal plan.provider_ref — a principal
minted for provider A does not satisfy provider B’s route (route-bound,
cross-provider replay denied). Otherwise the guard fails closed with
CamelError::Unauthenticated.