Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security Google对id_令牌的验证返回一个";无效的“U值”;_Security_Oauth 2.0_Google Api_Openid_Identityserver4 - Fatal编程技术网

Security Google对id_令牌的验证返回一个";无效的“U值”;

Security Google对id_令牌的验证返回一个";无效的“U值”;,security,oauth-2.0,google-api,openid,identityserver4,Security,Oauth 2.0,Google Api,Openid,Identityserver4,我的理解是,我应该能够提出这种请求 https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=<SOME_ID_TOKEN> 如何让Google令牌验证(针对id令牌)工作?这里一定少了什么 非常感谢您的建议。您是否已向谷歌API注册了您的应用程序?如果是,您如何登录应用程序以及如何获得此令牌 更新我只是配置客户端id和客户端机密,其他一切都由谷歌中间件处理 app.UseGoogleAuthentication(new Goo

我的理解是,我应该能够提出这种请求

https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=<SOME_ID_TOKEN>
如何让Google令牌验证(针对id令牌)工作?这里一定少了什么


非常感谢您的建议。

您是否已向谷歌API注册了您的应用程序?如果是,您如何登录应用程序以及如何获得此令牌

更新我只是配置客户端id和客户端机密,其他一切都由谷歌中间件处理

app.UseGoogleAuthentication(new GoogleOptions()
            {
                ClientId = Configuration["Authentication:Google:ClientId"],
                ClientSecret = Configuration["Authentication:Google:ClientSecret"]
            });
为了处理来自google的授权后的回调,我的帐户控制器中有这些函数用于任何外部登录。 ExternalLogin(),ExternalLogin确认()。检查样品


因此,我不是通过调用令牌端点来处理id令牌验证,而是由中间件来处理。你有什么特别的理由自己处理吗?

你可以问这些问题作为评论。这不是答案@JayDeeEss@MJK我需要50多个代表发表评论,正如你所看到的,我还没有50个。@Jaydeess我已经更新了我的问题,让它更清楚。@Jaydeess是的,我看到了所有这些都是示例,它们确实有效。然而,我需要直接与谷歌API对话,并根据谷歌文档(这应该是可能的)。这背后的原因是我需要验证的id令牌来自不同的应用程序。有一个例子,但我不能让这个工作。
app.UseGoogleAuthentication(new GoogleOptions()
            {
                ClientId = Configuration["Authentication:Google:ClientId"],
                ClientSecret = Configuration["Authentication:Google:ClientSecret"]
            });