In previous version of ASP.NET during SPA application the idea of AntiForgey token was following:
- add
@Html.AntiForgeryToken();
on the page - add
__RequestVerificationToken
to the request - ovverride AuthorizeAttribute as
ValidateJsonAntiForgeryTokenAttribute
.
I don't really understand the authorization requirements (is there some good information source?) in ASP.NET 5 but looks like new behavior should be like this:
- add
asp-anti-forgerytaghelper
- add
__RequestVerificationToken
to the request - here should be the new requirement.
The question is: how to write this new authorization requirement and remove standard one? Could someone give some advice or point me on some example? Thanks