MVC 5 & ASP.NET Identity - Implementation Confusion

后端 未结 2 1077
感情败类
感情败类 2020-12-08 23:19

I\'m creating a new web application that will be written using MVC 5 and Entity Framework Database First Approach. I would also like to use

2条回答
  •  北海茫月
    2020-12-08 23:56

    1) The new Katana Cookie middleware supports claims. This is what makes this better than forms auth cookie; claims model any key/value pair and those can be stored in the authentication cookie. See this post for more details:

    http://brockallen.com/2013/10/24/a-primer-on-owin-cookie-authentication-middleware-for-the-asp-net-developer/

    2 & 3) As far as your storage for identity data, if you need to work with an existing table then you might not be able to use Microsoft's EF provided classes. Instead you'd be left on your own to implement IUserStore and all the other store interfaces your app needs. I'm not certain it's worth changing what you're already using to store the user data.

    Keep in mind that the OWIN/Katana part is separate from the identity storage.

提交回复
热议问题