When I originally created my project, I chose the MVC template with individual user accounts, and checked the box to add Web API. Now I want to require authentication for certain API methods. As I understand it, if I add the Authorize attribute to the API
actions that I want to lock down, it will require the user to be authenticated; is this correct? If not, what do I need to do?
Assuming I make it validate the request on the server, I need to make the requests correctly; this is the part that I'm really stuck on. What do I need to do on the client (C#) to get authenticated? I would prefer to be able to use the HttpWebRequest.Credentials
property, but that doesn't seem to work out of the box.
Go to the complete details ...