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

View File

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