injector invoker and used as middleware