I would like to use ASP.NET WebAPI 2, but with my own authentication mechanism. I have tried to remove all the code that comes with SPA template in VS 2013, as well as normal WebAPI template. If I remove all auth-related code from the project and don't configure OWIN in it's Startup.Auth, I always get an error, that OWIN middleware authentication is not setup and I can't get to any controller's action.
What is the correct way to implement a token based authentication in WebAPI 2 with own code, bypassing what's aready is in OWIN host .dll's, including it's requirements of configuration?
Similar to John answer but you can remove the OWIN when creating the WebAPI. Much cleaner approach.
To do that: Select "Change authentication"
then choose "No Authenciation"
Now your project wont have the OWIN stuff
Cheers Choco
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With