From 9b9fd5ff009b453f0835d1354bbcf58c400ee7b7 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Tue, 15 Dec 2015 15:54:43 -0800 Subject: [PATCH] React to breaking changes in antiforgery --- src/MusicStore/Views/ShoppingCart/Index.cshtml | 2 +- test/MusicStore.Test/ShoppingCartControllerTest.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MusicStore/Views/ShoppingCart/Index.cshtml b/src/MusicStore/Views/ShoppingCart/Index.cshtml index cf0574e..fe413a1 100644 --- a/src/MusicStore/Views/ShoppingCart/Index.cshtml +++ b/src/MusicStore/Views/ShoppingCart/Index.cshtml @@ -9,7 +9,7 @@ public string GetAntiXsrfToken() { var tokens = Xsrf.GetTokens(Context); - return tokens.CookieToken + ":" + tokens.FormToken; + return tokens.CookieToken + ":" + tokens.RequestToken; } } diff --git a/test/MusicStore.Test/ShoppingCartControllerTest.cs b/test/MusicStore.Test/ShoppingCartControllerTest.cs index 904a2ba..3fbbd72 100644 --- a/test/MusicStore.Test/ShoppingCartControllerTest.cs +++ b/test/MusicStore.Test/ShoppingCartControllerTest.cs @@ -180,7 +180,7 @@ namespace MusicStore.Controllers // Header initialization for AntiForgery var headers = new KeyValuePair( "RequestVerificationToken", - new string[] { tokens.CookieToken + ":" + tokens.FormToken }); + new string[] { tokens.CookieToken + ":" + tokens.RequestToken }); httpContext.Request.Headers.Add(headers); // Cotroller initialization