views.py 文件源码

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

项目:SpongeAuth 作者: lukegb 项目源码 文件源码
def _verify_google_id_token(request):
    if 'google_id_token' not in request.POST:
        raise crypt.AppIdentityError("google_id_token missing.")
    token = request.POST.get('google_id_token', None)

    idinfo = client.verify_id_token(token, django_settings.GOOGLE_CLIENT_ID)
    if idinfo['iss'] not in ['accounts.google.com', 'https://accounts.google.com']:
        raise crypt.AppIdentityError("Invalid issuer.")

    return token, idinfo
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号