Google OAuth2"ServiceAccountCredential"使用ASP.NET Core(RTM)时不存在 [英] Google OAuth2 "ServiceAccountCredential" does not exist when using ASP.NET Core (RTM)

查看:83
本文介绍了Google OAuth2"ServiceAccountCredential"使用ASP.NET Core(RTM)时不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的.NET Core RC1应用程序中有一个ServiceAccount连接,效果很好.但是现在,"Service.AccountCredential"在"Google.APIs.Auth.OAuth2"中不再存在.整个库似乎在RTM版本的Core中缺少大量的类.

I had a ServiceAccount hookup in my .NET Core RC1 app that worked fine. However now, "ServiceAccountCredential" doesn't exist in "Google.APIs.Auth.OAuth2" anymore. The whole library seems to be missing a ton of classes in the RTM version of Core.

这是我project.json中的相关软件包

Here are the related packages in my project.json

"Google.Apis.Core": "1.14.0",
"Google.Apis.Auth": "1.14.0",
"Google.Apis.Oauth2.v2": "1.14.0.540"

我什至尝试使用RC1软件包,但我一直得到相同的东西.仅仅是因为Core尚未完全支持Google Auth?

I even tried using the RC1 packages, but I keep getting the same thing. Is it simply because Google Auth isn't fully supported in Core yet?

推荐答案

Google API确实确实完全支持.NET Core:

The Google API's indeed do not fully support .NET Core yet: https://github.com/google/google-api-dotnet-client/issues/695.

实际上ServiceAccountCredential是有问题的(正如我提到的

In fact the ServiceAccountCredential is problematic (as I mentioned here) since it calls Windows-specific API's to parse the certificate. It has to be implemented cross-platform first to fully support .NET Core (.NET Standard actually).

这篇关于Google OAuth2"ServiceAccountCredential"使用ASP.NET Core(RTM)时不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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