Anti Forgery Tokens with AngularJS and ASP.NET Web API

added by Bob Senoff
1/23/2015 2:11:05 PM

1 Kicks, 282 Views

Single Page Applications using AngularJS with ASP.NET will by default leave our web api methods open to forgery abuse. A few simple steps will allow you to add anti forgery protection. The first step will be to create a custom action filter attribute to test our solution which you can use to decorate web api classes or individual actions.