ASP.NET5 beta8 IServiceCollection 变化

ASP.NET5 beta8 IServiceCollection changes

将我的项目更新到最近发布的 ASP.NET 5 beta8 后,我发现 IServiceCollection 不再包含 ConfigureIdentityConfigureIdentityApplicationCookie 的定义。

所以之前写的代码像

services.ConfigureIdentity(o =>
    {
        o.Password.RequireUppercase = false;
        o.Password.RequireNonLetterOrDigit = false;
    });

services.ConfigureIdentityApplicationCookie(o => o.LoginPath = "/Admin/Users/Login");

不能编译了

Google搜索无果,估计是beta8发布才过了一天

有没有人找到解决方法?在 beta8 中应该如何配置身份选项?

删除了 Configure* 方法,Add* 方法现在接受 Action<TOptions>:

services.AddIdentity<TUser, TRole>(o =>
{
    o.Password.RequireUppercase = false;
    o.Password.RequireNonLetterOrDigit = false;
    o.Cookies.ApplicationCookie.LoginPath = "/Admin/Users/Login";
});

不完全相关,但部分相关:https://github.com/aspnet/Announcements/issues/71