appengine.py 文件源码

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

项目:office-interoperability-tools 作者: milossramek 项目源码 文件源码
def _refresh(self, http_request):
    """Refreshes the access_token.

    Since the underlying App Engine app_identity implementation does its own
    caching we can skip all the storage hoops and just to a refresh using the
    API.

    Args:
      http_request: callable, a callable that matches the method signature of
        httplib2.Http.request, used to make the refresh request.

    Raises:
      AccessTokenRefreshError: When the refresh fails.
    """
    try:
      (token, _) = app_identity.get_access_token(self.scope)
    except app_identity.Error, e:
      raise AccessTokenRefreshError(str(e))
    self.access_token = token
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号