def ValidXsrfTokenRequired(original_handler):
  def Handler(self, *args, **kwargs):
    if self.request.get('xsrf_token') == GetXsrfToken():
      return original_handler(self, *args, **kwargs)
    else:
      self.redirect(co.LINKS['public_index'])
      return

  Handler.__name__ = original_handler.__name__
  return Handler
Require a valid XSRF token in the environment, or error.
dataset/ETHPy150Open googleanalytics/google-analytics-super-proxy/src/controllers/util/access_control.py/ValidXsrfTokenRequired