refactor: authorize request

Refactor authorizedRequest to present a slightly different and hopefully simpler to understand approach to solve the problem.