Security in web is very intricate and delicate topic. I will attempt to explain how to do it in WebAPI in my approach. When we propose to develop an enterprise-level application, we specifically want to take care of authentication and authorization. These are two techniques that, if used in a correct way, makes our WebAPI secure.
There are two ways to achieve security in WebAPI
- Token Based