I would like to return a HTTP status 404 (NotFound) when a anonymous user tries to access a resource (/preferences) that only makes sense for a identified user.
Using as [Authorize] attribute on my Controller/Method automatically returns a 401 (Unauthorized) for a anonymous user, but handling authorization inside method does not sound good. Any thoughts?
Edit: I am using Asp.Net Web API 2 and Authorize attribute to secure resources.
Related resources for people wandering why would I return a 404: