Last post Mar 18, 2015 02:55 AM by Sherwin Zhao
Mar 13, 2015 06:45 PM|byuan|LINK
I am working on asp.net mvc 4 application, and I added webapi feature to this project, my problem is how to implement authentication and authorization for this project with two client end.
For the web part, I am using Form Authentication with SimpleMembership, it works fine. But for webapi, what is the best way to implement authenticaiton? I went through a few proposed solutions, such as custom message handler, custom authentication/authorization
filters, but my question is can I use the same AccountController created for login, or a separate login/authentication process only for webapi client? Also, I have a separate user profile entity, in MVC, it is easy to retrieve profile data, but what can I
do for webapi client, I need to get the information to customize user interface as well. I am using AngularJS for webapi client side.
I am confusing on how to implement this, please help with any ideas or links.
Thanks in advance
Mar 18, 2015 02:55 AM|Sherwin Zhao|LINK
Thanks for you post.
About Webapi Authentication, you could refer to the following links:
External Authentication Services with ASP.NET Web API
Authentication and Authorization in ASP.NET Web API
Hope this can be helpful to you.