1.

HOW to secure ASP.NET Web API?

Answer»

Web API has become key to PROGRAMMING web-based interactions. It can be accessed by anyone who knows the URL. Therefore, they have become targets for hackers. One needs to SECURE Web API by controlling Web API and by deciding who can and who cannot have ACCESS to Web API. There are basically two ways or techniques that make our Web API more secure. 

Authentication: It is a process that helps to identify and check users by their credentials such as password, USERNAME, etc. To have access to the web API, firstly user credentials are needed to be passed in the request header. If user credentials are not passed into the request header, then the server returns 401 status code (unauthorized). The best authentication to be used is OAuth 2.0. 

Authorization: It is a process that helps to decide whether or not a user has access to perform an action. Authorization filters are used to implement authorization.



Discussion

No Comment Found