After dooing some research i understood there are many ways to implement authentication and authorization in WebAPI 2 ... I'm looking specifically at Token based authentication
- implementing a custom OAuth Provider and injecting it to OWING pipline
- implementing an "Authentication" controller which will generate the required token sotre it to the DB and use a custom authorization attribute (can understand the advantage or disadvantage of this way from #1) see here http://www.asp.net/web-api/overview/security/authentication-filters
- A full custom authentication framework implementing token authentication like described here http://www.codeproject.com/Articles/630986/Cross-Platform-Authentication-With-ASP-NET-Web-API
What is the best way to go here ? I am very confused ...