code: def check_authorization(self, response):
          
          if not hasattr(request, '_authorized'):
              raise Unauthorized
          elif not request._authorized:
              raise Unauthorized
          return response
docs: checks that an authorization call has been made during the request