Add authentication to ASP.NET WebApi 2.2

I created a WebApi 2.2 project (from an Empty new ASP.NET project) to prove some implementation concepts, and now I want to add authentication to it.

I noticed that the only way to add authentication to a new WebApi application is to use one of the templates (VS 2013, in my case).

Is there a sure way to add authentication to an existing WebApi 2.2 application?

I want to use media tokens if that matters for any answers I can get.

+7
authentication c # restful-authentication asp.net-web-api
source share
1 answer

Yes, you can add bearer authentication from scratch, I'm not a big fan of VS 2013 templates because they mix cookies and tokens. You can check out my detailed blog post on how to add media tokens only to a new or existing web API project. Let me know if you need more help.

+13
source share

All Articles