Automatically validating anti-forgery tokens in ASP.NET Core with the AutoValidateAntiforgeryTokenAttribute

added by DotNetKicks
6/12/2017 10:49:19 AM

1109 Views

This quick post is a response to a question about anti-forgery tokens I saw on twitter: I want to apply ValidateAntiForgeryToken to every action on all HttpPost requests in #AspNetCore MVC. Any easy way to do this? #dotnetcore - Tugberk Ugurlu (@tourismgeek) 10 June 2017 Anti-forgery tokens are a security mechanism to defend against cross-site request forgery (CSRF) attacks.


0 comments