【发布时间】: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?
【问题讨论】:
-
您是否尝试过使用
Microsoft.AspNetCore.Authentication.Google包? github.com/aspnet/Security/tree/1.0.0/src/… 来源。 docs.asp.net/en/latest/security/authentication/… 是 facebook 的一个例子。谷歌也是类似的,但在文档中还没有。从上面检查 GitHub 存储库 -
@Tseng 是关于通过 Google 进行身份验证的。 OP 希望通过服务帐户使用 Google API 访问 Google 服务。
标签: asp.net asp.net-mvc asp.net-core google-authentication service-accounts