Esempio n. 1
0
def get_default_auth_config():
    """Returns auth configuration used by default if configure_auth is not called.

  If running in a headless mode on bots, will use 'bot' auth, otherwise
  'oauth' with default oauth config.

  Returns pair (auth method name, auth method config).
  """
    if tools.is_headless():
        return 'bot', None
    else:
        return 'oauth', oauth.make_oauth_config()
Esempio n. 2
0
def get_default_auth_config():
  """Returns auth configuration used by default if configure_auth is not called.

  If running in a headless mode on bots, will use 'bot' auth, otherwise
  'oauth' with default oauth config.

  Returns pair (auth method name, auth method config).
  """
  if tools.is_headless():
    return 'bot', None
  else:
    return 'oauth', oauth.make_oauth_config()
Esempio n. 3
0
def get_oauth_config():
  """Returns global OAuthConfig as set by 'set_oauth_config' or default one."""
  return _auth_config or oauth.make_oauth_config()
Esempio n. 4
0
def get_oauth_config():
  """Returns global OAuthConfig as set by 'set_oauth_config' or default one."""
  return _auth_config or oauth.make_oauth_config()