为什么jwt.io不能解码google JWT token [英] Why can't the google JWT token be decoded by jwt.io
问题描述
我在 Azure App Service .NET Core 应用程序中启用了 Google 身份验证,我正在尝试使用 Postman 生成访问令牌:
I have Google authentication enabled in an Azure App Service .NET Core application, and I am trying to generate an access token using Postman:
access token
和 id_token
成功生成,但是当我将 access token
输入到
An access token
and an id_token
get successfully generated, but when I input the access token
into jwt.io, I see gibberish back:
我是 google auth 和 JWT 的新手,所以我的期望可能完全无效,但我不应该能够在 jwt.io?
推荐答案
访问令牌不是 JWT.id_token 是一个 JWT,您应该能够使用 jwt.io 对其进行解码.
The access token is not a JWT. The id_token is a JWT and you should be able to decode it using jwt.io.
区别在于 OAuth 2.0 和 OpenID Connect 之间的区别.
The difference is connected to the difference between OAuth 2.0 and OpenID Connect.
访问令牌用于向 Google API 发出额外请求:https://developers.google.com/identity/protocols/OAuth2WebServer#callinganapi
The access token is used to make additional requests to Google API: https://developers.google.com/identity/protocols/OAuth2WebServer#callinganapi
id_token 已经保存了验证用户的信息:https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo
The id_token already holds the information for the authenticating user: https://developers.google.com/identity/protocols/OpenIDConnect#obtainuserinfo
这篇关于为什么jwt.io不能解码google JWT token的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!