We have some existing MVC web services that are called AJAX style from web pages. These services make use of the ValidateAntiForgeryToken attribute to help prevent request forgeries.
We are looking to migrate these services to Web API, but there appears to be no equivalent anti-forgery functionality.
Am I missing something? Is there a different approach to addressing request forgeries with Web API?
You could implement such authorization attribute:
and then decorate your API actions with it: