pub fn resource_auth_middleware(
policy: Arc<dyn IAuthorizationPolicy>,
) -> impl IMiddlewareExpand description
Create a resource-based authorization middleware.
Register this middleware AFTER the authentication middleware in the pipeline. The middleware reads the route pattern (set by the router) and claims (set by the auth middleware) to enforce the policy.