Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Update AuthenticationScheme in front api
supportd644b2a2fcfc
diff --git a/src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.cs b/src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.csindex c5fc87f5e..df6b9c1ab 100644--- a/src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.cs+++ b/src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.cs@@ -66,7 +66,7 @@ namespace Grand.Api.Infrastructure});- builder.AddJwtBearer(FrontendAPIConfig.Scheme, options =>+ builder.AddJwtBearer(FrontendAPIConfig.AuthenticationScheme, options =>{var config = new FrontendAPIConfig();configuration.GetSection("FrontendAPI").Bind(config);diff --git a/src/Business/Grand.Business.Authentication/Services/ApiAuthenticationService.cs b/src/Business/Grand.Business.Authentication/Services/ApiAuthenticationService.csindex 4e5f20660..ab8fad61f 100644--- a/src/Business/Grand.Business.Authentication/Services/ApiAuthenticationService.cs+++ b/src/Business/Grand.Business.Authentication/Services/ApiAuthenticationService.cs@@ -75,7 +75,7 @@ namespace Grand.Business.Authentication.Services{Customer customer = null;if (_httpContextAccessor.HttpContext == null) return null;- var authResult = await _httpContextAccessor.HttpContext.AuthenticateAsync(FrontendAPIConfig.Scheme);+ var authResult = await _httpContextAccessor.HttpContext.AuthenticateAsync(FrontendAPIConfig.AuthenticationScheme);if (!authResult.Succeeded){_httpContextAccessor.HttpContext.Response.StatusCode = 400;diff --git a/src/Core/Grand.Infrastructure/Configuration/FrontendAPIConfig.cs b/src/Core/Grand.Infrastructure/Configuration/FrontendAPIConfig.csindex 8fae37a7c..e542eeedc 100644--- a/src/Core/Grand.Infrastructure/Configuration/FrontendAPIConfig.cs+++ b/src/Core/Grand.Infrastructure/Configuration/FrontendAPIConfig.cs@@ -2,7 +2,7 @@{public class FrontendAPIConfig{- public static string Scheme => "GrandWebBearerScheme";+ public static string AuthenticationScheme => "FrontAuthentication";public bool Enabled { get; set; }public bool JsonContentType { get; set; }public string SecretKey { get; set; }