Google OAuth2"ServiceAccountCredential"使用ASP.NET Core(RTM)时不存在 [英] Google OAuth2 "ServiceAccountCredential" does not exist when using 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?
推荐答案
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屋!