def xsrf_secret_key():
 secret = memcache.get(XSRF_MEMCACHE_ID, namespace=OAUTH2CLIENT_NAMESPACE)
 if (not secret):
  model = SiteXsrfSecretKey.get_or_insert(key_name='site')
  if (not model.secret):
   model.secret = _generate_new_xsrf_secret_key()
   model.put()
  secret = model.secret
  memcache.add(XSRF_MEMCACHE_ID, secret, namespace=OAUTH2CLIENT_NAMESPACE)
 return str(secret)

def xsrf_secret_key ( ) : secret = memcache . get ( XSRF_MEMCACHE_ID , namespace = OAUTH2CLIENT_NAMESPACE ) if ( not secret ) : model = SiteXsrfSecretKey . get_or_insert ( key_name = 'site' ) if ( not model . secret ) : model . secret = _generate_new_xsrf_secret_key ( ) model . put ( ) secret = model . secret memcache . add ( XSRF_MEMCACHE_ID , secret , namespace = OAUTH2CLIENT_NAMESPACE ) return str ( secret )
return the secret key for use for xsrf protection .