OWIN配置:CookieAuthenticationDefaults.AuthenticationType和DefaultAuthenticationTypes.ApplicationCookie之间的区别是什么

时间:2016-07-10 00:31:06

标签: c# asp.net asp.net-identity owin

我正在重新审视我的OwinStartup类中的一些代码,并且有这个定义:

app.UseCookieAuthentication(new CookieAuthenticationOptions {
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new PathString("/login")
});

常量DefaultAuthenticationTypes.ApplicationCookie似乎来自Microsoft.AspNet.Identity.Core,其值为"ApplicationCookie"

常量CookieAuthenticationDefaults.AuthenticationType来自Microsoft.Owin.Security.Cookies,其值为"Cookies"。它的autodocs读取 [在CookieAuthenticationOptions]中使用的默认值 ...

这两个常量对OWIN管道有什么影响?

我没有在我的解决方案中的任何其他地方使用任何AspNet.Identity.Core,那么我应该删除依赖项并使用CookieAuthenticationDefaults吗?

0 个答案:

没有答案
相关问题