Identity: Issuer fix for Xamarin against docker scenario
This commit is contained in:
parent
484a7d0d14
commit
637d709e36
@ -16,7 +16,7 @@
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
|
@ -67,7 +67,7 @@ namespace eShopOnContainers.Identity
|
||||
clientUrls.Add("Spa", Configuration.GetValue<string>("SpaClient"));
|
||||
|
||||
// Adds IdentityServer
|
||||
services.AddIdentityServer()
|
||||
services.AddIdentityServer(x => x.IssuerUri = "null")
|
||||
.AddTemporarySigningCredential()
|
||||
.AddInMemoryScopes(Config.GetScopes())
|
||||
.AddInMemoryClients(Config.GetClients(clientUrls))
|
||||
|
@ -52,17 +52,20 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
|
||||
|
||||
public async Task<IActionResult> AddToCart(CatalogItem productDetails)
|
||||
{
|
||||
var user = _appUserParser.Parse(HttpContext.User);
|
||||
var product = new BasketItem()
|
||||
if (productDetails != null)
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
Quantity = 1,
|
||||
ProductName = productDetails.Name,
|
||||
PictureUrl = productDetails.PictureUri,
|
||||
UnitPrice = productDetails.Price,
|
||||
ProductId = productDetails.Id
|
||||
};
|
||||
await _basketSvc.AddItemToBasket(user, product);
|
||||
var user = _appUserParser.Parse(HttpContext.User);
|
||||
var product = new BasketItem()
|
||||
{
|
||||
Id = Guid.NewGuid().ToString(),
|
||||
Quantity = 1,
|
||||
ProductName = productDetails.Name,
|
||||
PictureUrl = productDetails.PictureUri,
|
||||
UnitPrice = productDetails.Price,
|
||||
ProductId = productDetails.Id
|
||||
};
|
||||
await _basketSvc.AddItemToBasket(user, product);
|
||||
}
|
||||
return RedirectToAction("Index", "Catalog");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user