Refactor wrap-require-authorization to recieve uri