我在这里查看了 Google 的 OpenId Connect 发现文档。它清楚地表明支持的声明是:
"claims_supported": [
"aud",
"email",
"email_verified",
"exp",
"family_name",
"given_name",
"iat",
"iss",
"locale",
"name",
"picture",
"sub"
]
并且支持的范围是
"scopes_supported": [
"openid",
"email",
"profile"
]
我希望当我向OpenId Connect UserInfo 端点(即https://www.googleapis.com/oauth2/v3/userinfo)发送 GET 请求时,我会取回所有支持的声明(假设当我进行了身份验证,我请求了所有受支持的范围......我在发送初始请求时做了如下所示)
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=my-client-id&redirect_uri=http://myapp.com&scope=openid profile email&state=someLongStateIdentifier
以下是我在 UserInfo 端点请求的响应中得到的声明:
{
"sub": "...",
"name": "...",
"given_name": "...",
"family_name": "...",
"picture": "...",
"email": "...",
"email_verified": true,
"locale": "..."
}
请注意它们如何成为所有受支持声明的子集...谁能告诉我为什么我的回复中没有得到所有受支持的声明?