Reuse existing ASP.NET-MVC 5 Identity 2 authorization for WEB API OData controllers to make it easy to login for other apps?
问题 I have complete ASP.NET-MVC5 application which I extended by the WEB API 2 OData controllers. For instance I have: public class PersonController : ODataController and MVC controller which demands authorization [Authorize] public class PersonController : Controller Both contollers use ApplicationDbContext where my DbSets are I don't want to give data about person to everyone in the world through WEB API controller. I already have User , Moderator and Admin roles in my MVC application. Can I