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
|
// 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();
|
||||||
|
|
|
||||||
|
|
@ -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" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue