fetch_service_config.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:endpoints-tools 作者: cloudendpoints 项目源码 文件源码
def make_access_token(secret_token_json):
    """Construct an access token from service account token."""
    logging.info("Constructing an access token with scope " + _GOOGLE_API_SCOPE)
    credentials = ServiceAccountCredentials.from_json_keyfile_name(
        secret_token_json,
        scopes=[_GOOGLE_API_SCOPE])
    logging.info("Service account email: " + credentials.service_account_email)
    token = credentials.get_access_token().access_token
    return token
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号