Change the response type of authorize to work with endpoints.