Enabling code for [ValidateAntiForgeryToken] in the sample.
This commit is contained in:
parent
32ed9c513a
commit
4f7a0390c9
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue