How to force an app on every request that happends

hello friends .
i have an app that do some action like token generate for each request.
i want to load app , when new request come from OC , and check tokens , if false, logout the user
how can i force my app to load ?
i use loadApp from ocp , but it does not work as good as i want ,
i think i have to do something on webdav ,
thanks a lot