【问题标题】:Google OAuth2 "ServiceAccountCredential" does not exist when using ASP.NET Core (RTM)使用 ASP.NET Core (RTM) 时不存在 Google OAuth2“ServiceAccountCredential”
【发布时间】:2016-11-30 04:49:09
【问题描述】:

我的 .NET Core RC1 应用程序中有一个 ServiceAccount 连接,运行良好。但是现在,“Google.APIs.Auth.OAuth2”中不再存在“ServiceAccountCredential”。在 RTM 版本的 Core 中,整个库似乎缺少大量类。

这是我的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?

【问题讨论】:

标签: asp.net asp.net-mvc asp.net-core google-authentication service-accounts


【解决方案1】:

Google API 确实完全支持 .NET Core:https://github.com/google/google-api-dotnet-client/issues/695

事实上,ServiceAccountCredential 是有问题的(正如我提到的here),因为它调用特定于 Windows 的 API 来解析证书。它必须首先实现跨平台才能完全支持.NET Core(实际上是.NET Standard)。

【讨论】:

  • 这正是我正在寻找的确认。我有一种强烈的感觉,它只是不/不支持。感谢您的链接 - 我现在可以寻找替代方案。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-07-30
  • 2016-10-31
  • 1970-01-01
  • 2016-12-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多