pub async fn with_token_scope<F: Future>(token: SecretString, f: F) -> F::OutputExpand description
Run a future with CURRENT_TOKEN set so that current_token() returns
the given value inside the future. Useful when MCP tool handlers need the
raw bearer token but run in a spawned task where the RBAC middleware’s
task-local scope is no longer active.