diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj index bb833177e..545e3dbfb 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj @@ -16,7 +16,7 @@ Resources\Resource.Designer.cs Off True - v7.0 + v6.0 Properties\AndroidManifest.xml diff --git a/src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs b/src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs index 58950f83d..467c570ad 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs +++ b/src/Services/Identity/eShopOnContainers.Identity/Controllers/AccountController.cs @@ -156,10 +156,11 @@ namespace IdentityServer4.Quickstart.UI.Controllers return await Logout(new LogoutViewModel { LogoutId = logoutId }); } + //Test for Xamarin. var context = await _interaction.GetLogoutContextAsync(logoutId); if (context?.ShowSignoutPrompt == false) { - // it's safe to automatically sign-out + //it's safe to automatically sign-out return await Logout(new LogoutViewModel { LogoutId = logoutId }); } @@ -169,7 +170,6 @@ namespace IdentityServer4.Quickstart.UI.Controllers { LogoutId = logoutId }; - return View(vm); } @@ -211,9 +211,21 @@ namespace IdentityServer4.Quickstart.UI.Controllers // get context information (client name, post logout redirect URI and iframe for federated signout) var logout = await _interaction.GetLogoutContextAsync(model.LogoutId); + return Redirect(logout?.PostLogoutRedirectUri); } + public async Task DeviceLogOut(string redirectUrl) + { + // delete authentication cookie + await HttpContext.Authentication.SignOutAsync(); + + // set this so UI rendering sees an anonymous user + HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity()); + + return Redirect(redirectUrl); + } + /// /// initiate roundtrip to external authentication provider /// diff --git a/src/Services/Identity/eShopOnContainers.Identity/Controllers/HomeController.cs b/src/Services/Identity/eShopOnContainers.Identity/Controllers/HomeController.cs index 6814bb456..5c0cbd9a9 100644 --- a/src/Services/Identity/eShopOnContainers.Identity/Controllers/HomeController.cs +++ b/src/Services/Identity/eShopOnContainers.Identity/Controllers/HomeController.cs @@ -24,9 +24,6 @@ namespace IdentityServer4.Quickstart.UI.Controllers public IActionResult Index(string returnUrl) { - if (returnUrl != "") - return Redirect(_settings.Value.MvcClient); - return View(); } diff --git a/src/Services/Ordering/Ordering.API/Controllers/OrdersController.cs b/src/Services/Ordering/Ordering.API/Controllers/OrdersController.cs index cad3bf4c1..3349f45ab 100644 --- a/src/Services/Ordering/Ordering.API/Controllers/OrdersController.cs +++ b/src/Services/Ordering/Ordering.API/Controllers/OrdersController.cs @@ -38,7 +38,10 @@ public async Task AddOrder([FromBody]NewOrderRequest order) { if (order.CardExpiration == DateTime.MinValue) - order.CardExpiration = DateTime.Now; + order.CardExpiration = DateTime.Now.AddYears(5); + + if (order.CardTypeId == 0) + order.CardTypeId = 1; order.Buyer = GetUserName(); diff --git a/src/Web/WebMVC/ViewComponents/Cart.cs b/src/Web/WebMVC/ViewComponents/Cart.cs index bfa072f18..70e96e208 100644 --- a/src/Web/WebMVC/ViewComponents/Cart.cs +++ b/src/Web/WebMVC/ViewComponents/Cart.cs @@ -31,7 +31,6 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewComponents { var basket = await _cartSvc.GetBasket(user); return basket.Items.Count; - return await Task.Run(()=> { return 0; }); } } } diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Program.cs b/src/Web/WebSPA/eShopOnContainers.WebSPA/Program.cs index 3b16eab2e..690c56eac 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Program.cs +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Program.cs @@ -18,7 +18,7 @@ namespace eShopConContainers.WebSPA .UseConfiguration(config) .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() - .UseUrls("http://localhost:5104/") + //.UseUrls("http://localhost:5104/") .UseStartup() .Build(); diff --git a/src/Web/WebSPA/eShopOnContainers.WebSPA/Properties/launchSettings.json b/src/Web/WebSPA/eShopOnContainers.WebSPA/Properties/launchSettings.json index 1c708903c..fd33f59ec 100644 --- a/src/Web/WebSPA/eShopOnContainers.WebSPA/Properties/launchSettings.json +++ b/src/Web/WebSPA/eShopOnContainers.WebSPA/Properties/launchSettings.json @@ -3,7 +3,7 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:1250/", + "applicationUrl": "http://localhost:5104/", "sslPort": 0 } },