I have an MVC webapi site that uses OAuth/token authentication to authenticate requests. All the relevant controllers have the right attributes, and authentication is workin
You also follow this code:
var response = new HttpResponseMessage(HttpStatusCode.NotFound) { Content = new StringContent("Users doesn't exist", System.Text.Encoding.UTF8, "text/plain"), StatusCode = HttpStatusCode.NotFound } throw new HttpResponseException(response);