3

这可能是一个愚蠢的问题,但我在互联网上没有找到答案。我看到了 MVC5 和 oAuth 的以下代码

app.UseFacebookAuthentication app.UseGoogleAuthentication();

但是,我在调试器中的 app 对象上没有看到任何名为 UseGoogleAuthentication 的方法。我确实在 Katana 代码中看到了 AppBuilder 上的“使用”方法。那么发生了什么?从哪里这个“app.UseGoogleAuthentication();” 神秘手段要来了?我确定我错过了一些约定,但它是什么?

提前致谢

4

2 回答 2

4

它是一种扩展方法,一旦您安装 Microsoft.Owin.Security.Google Nuget 包,它就会显示出来。

于 2014-02-27T13:50:12.857 回答
0

以下是命令 Install-Package Microsoft.Owin.Security.Google

网址是https://www.nuget.org/packages/Microsoft.Owin.Security.Google/

于 2016-12-28T07:40:00.303 回答