当前位置: 首页>>代码示例>>Python>>正文


Python gce.AppAssertionCredentials方法代码示例

本文整理汇总了Python中oauth2client.gce.AppAssertionCredentials方法的典型用法代码示例。如果您正苦于以下问题:Python gce.AppAssertionCredentials方法的具体用法?Python gce.AppAssertionCredentials怎么用?Python gce.AppAssertionCredentials使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oauth2client.gce的用法示例。


在下文中一共展示了gce.AppAssertionCredentials方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _implicit_credentials_from_gae

# 需要导入模块: from oauth2client import gce [as 别名]
# 或者: from oauth2client.gce import AppAssertionCredentials [as 别名]
def _implicit_credentials_from_gae():
    """Attempts to get implicit credentials in Google App Engine env.

    If the current environment is not detected as App Engine, returns None,
    indicating no Google App Engine credentials can be detected from the
    current environment.

    Returns:
        None, if not in GAE, else an appengine.AppAssertionCredentials object.
    """
    if not _in_gae_environment():
      return None

    return _get_application_default_credential_GAE() 
开发者ID:yuxiaokui,项目名称:Intranet-Penetration,代码行数:16,代码来源:client.py

示例2: _implicit_credentials_from_gce

# 需要导入模块: from oauth2client import gce [as 别名]
# 或者: from oauth2client.gce import AppAssertionCredentials [as 别名]
def _implicit_credentials_from_gce():
    """Attempts to get implicit credentials in Google Compute Engine env.

    If the current environment is not detected as Compute Engine, returns None,
    indicating no Google Compute Engine credentials can be detected from the
    current environment.

    Returns:
        None, if not in GCE, else a gce.AppAssertionCredentials object.
    """
    if not _in_gce_environment():
      return None

    return _get_application_default_credential_GCE() 
开发者ID:yuxiaokui,项目名称:Intranet-Penetration,代码行数:16,代码来源:client.py

示例3: _get_application_default_credential_GAE

# 需要导入模块: from oauth2client import gce [as 别名]
# 或者: from oauth2client.gce import AppAssertionCredentials [as 别名]
def _get_application_default_credential_GAE():
  from oauth2client.appengine import AppAssertionCredentials

  return AppAssertionCredentials([]) 
开发者ID:yuxiaokui,项目名称:Intranet-Penetration,代码行数:6,代码来源:client.py

示例4: _get_application_default_credential_GCE

# 需要导入模块: from oauth2client import gce [as 别名]
# 或者: from oauth2client.gce import AppAssertionCredentials [as 别名]
def _get_application_default_credential_GCE():
  from oauth2client.gce import AppAssertionCredentials

  return AppAssertionCredentials([]) 
开发者ID:yuxiaokui,项目名称:Intranet-Penetration,代码行数:6,代码来源:client.py

示例5: _implicit_credentials_from_gae

# 需要导入模块: from oauth2client import gce [as 别名]
# 或者: from oauth2client.gce import AppAssertionCredentials [as 别名]
def _implicit_credentials_from_gae():
        """Attempts to get implicit credentials in Google App Engine env.

        If the current environment is not detected as App Engine, returns None,
        indicating no Google App Engine credentials can be detected from the
        current environment.

        Returns:
            None, if not in GAE, else an appengine.AppAssertionCredentials
            object.
        """
        if not _in_gae_environment():
            return None

        return _get_application_default_credential_GAE() 
开发者ID:satwikkansal,项目名称:OneClickDTU,代码行数:17,代码来源:client.py

示例6: _implicit_credentials_from_gce

# 需要导入模块: from oauth2client import gce [as 别名]
# 或者: from oauth2client.gce import AppAssertionCredentials [as 别名]
def _implicit_credentials_from_gce():
        """Attempts to get implicit credentials in Google Compute Engine env.

        If the current environment is not detected as Compute Engine, returns
        None, indicating no Google Compute Engine credentials can be detected
        from the current environment.

        Returns:
            None, if not in GCE, else a gce.AppAssertionCredentials object.
        """
        if not _in_gce_environment():
            return None

        return _get_application_default_credential_GCE() 
开发者ID:satwikkansal,项目名称:OneClickDTU,代码行数:16,代码来源:client.py

示例7: _get_application_default_credential_GAE

# 需要导入模块: from oauth2client import gce [as 别名]
# 或者: from oauth2client.gce import AppAssertionCredentials [as 别名]
def _get_application_default_credential_GAE():
    from oauth2client.appengine import AppAssertionCredentials

    return AppAssertionCredentials([]) 
开发者ID:satwikkansal,项目名称:OneClickDTU,代码行数:6,代码来源:client.py

示例8: _get_application_default_credential_GCE

# 需要导入模块: from oauth2client import gce [as 别名]
# 或者: from oauth2client.gce import AppAssertionCredentials [as 别名]
def _get_application_default_credential_GCE():
    from oauth2client.gce import AppAssertionCredentials

    return AppAssertionCredentials([]) 
开发者ID:satwikkansal,项目名称:OneClickDTU,代码行数:6,代码来源:client.py


注:本文中的oauth2client.gce.AppAssertionCredentials方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。