Extract access authorizer and add unit test