def get_current_user():
""" GAE compatibility method. """
request = webapp2.get_request()
app = webapp2.get_app()
audience = app.config.get('idtoken_audience')
if not audience:
raise Exception('idtoken_audience not configured')
token = request.headers.get('x-w69b-idtoken')
return _user_from_token(token, audience)
评论列表
文章目录