在客户端验证 ID 令牌
Verification of ID tokens on client side
我正在努力将 OAuth 2.0 实施到一堆应用程序中,我必须减少所需的登录凭据。但是,我很难理解 OAuth 2.0 之上的 OpenID Connect 以及我应该如何验证给定的 JWT
令牌。是否应在实际令牌中提供 public 密钥,以便客户端可以检查签名?
此外,如果我错了,请纠正我,但我相信这个令牌永远不会发送到资源服务器,而是作为 "helping hand" 客户端根据信息向用户提供正确的输出在令牌中给出?如果是这样,是否有一套标准来规定每个 JWT
应该包含什么类型的信息?
身份令牌在成功令牌响应之后发送,通常是 JWT。
ID 令牌验证在第 3.1.3.7 节中进行了描述。 ID 令牌验证。
对于 ID 令牌 secured with the RSA or EC signature (e.g. RS256), you need the IdP’s public JSON Web Key (JWK) set. It is published as a simple JSON document at an URL which is also advertised in the OpenID Provider’s metadata] in the jwks_uri parameter. You can check out Google’s JSON Web Key (JWK) 看看 JWK 集是什么样的。
对于 ID tokens secured with an HMAC(例如 HS256),您使用 client_secret 来执行验证。
我正在努力将 OAuth 2.0 实施到一堆应用程序中,我必须减少所需的登录凭据。但是,我很难理解 OAuth 2.0 之上的 OpenID Connect 以及我应该如何验证给定的 JWT
令牌。是否应在实际令牌中提供 public 密钥,以便客户端可以检查签名?
此外,如果我错了,请纠正我,但我相信这个令牌永远不会发送到资源服务器,而是作为 "helping hand" 客户端根据信息向用户提供正确的输出在令牌中给出?如果是这样,是否有一套标准来规定每个 JWT
应该包含什么类型的信息?
身份令牌在成功令牌响应之后发送,通常是 JWT。
ID 令牌验证在第 3.1.3.7 节中进行了描述。 ID 令牌验证。
对于 ID 令牌 secured with the RSA or EC signature (e.g. RS256), you need the IdP’s public JSON Web Key (JWK) set. It is published as a simple JSON document at an URL which is also advertised in the OpenID Provider’s metadata] in the jwks_uri parameter. You can check out Google’s JSON Web Key (JWK) 看看 JWK 集是什么样的。
对于 ID tokens secured with an HMAC(例如 HS256),您使用 client_secret 来执行验证。