Enabling code for [ValidateAntiForgeryToken] in the sample.

This commit is contained in:
Praburaj 2014-05-07 17:31:57 -07:00
parent 32ed9c513a
commit 4f7a0390c9
2 changed files with 5 additions and 4 deletions

View File

@ -36,7 +36,7 @@ namespace MusicStore.Controllers
// POST: /Account/Login
[HttpPost]
[AllowAnonymous]
//[ValidateAntiForgeryToken]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Login(LoginViewModel model, string returnUrl)
{
if (ModelState.IsValid == true)
@ -74,7 +74,7 @@ namespace MusicStore.Controllers
// POST: /Account/Register
[HttpPost]
[AllowAnonymous]
//[ValidateAntiForgeryToken]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Register(RegisterViewModel model)
{
//Bug: https://github.com/aspnet/WebFx/issues/247
@ -114,7 +114,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/Manage
[HttpPost]
//[ValidateAntiForgeryToken]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Manage(ManageUserViewModel model)
{
ViewBag.ReturnUrl = Url.Action("Manage");
@ -140,7 +140,7 @@ namespace MusicStore.Controllers
//
// POST: /Account/LogOff
[HttpPost]
//[ValidateAntiForgeryToken]
[ValidateAntiForgeryToken]
public IActionResult LogOff()
{
SignInManager.SignOut();

View File

@ -32,6 +32,7 @@
<Content Include="Images\logo.svg" />
<Content Include="Images\placeholder.png" />
<Content Include="Images\placeholder.svg" />
<Content Include="k.ini" />
<Content Include="LKG.json" />
<Content Include="LocalConfig.json" />
<Content Include="Project.json" />