什么是id_token谷歌oauth [英] what is id_token google oauth

查看:84
本文介绍了什么是id_token谷歌oauth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试对googleapi执行oauth2时,我得到了以下结果.只有一件事:在文档中,我找不到id_token的用途.

I just got the following result when I tried to do oauth2 to googleapi. Only one thing: I couldn't find what is id_token used for in documentation.

{
  "access_token": "xxxx",
  "token_type": "Bearer",
  "expires_in": 3600,
  "id_token": "veryverylongstring",
  "refresh_token": "abcdefg"
}

推荐答案

id_token是JSON Web令牌(JWT).如果对其进行解码,则会看到它包含多个断言,包括用户的ID.有关更多详细信息,请参见此答案.

id_token is a JSON Web Token (JWT). If you decode it, you'll see it contains multiple assertions, including the ID of the user. See this answer for more details.

这篇关于什么是id_token谷歌oauth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆