Skip to content

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.

Typo fix #249

support1f2992cadc2b
diff --git a/src/API/Grand.Api/Commands/Handlers/Common/GenerateTokenWebCommandHandler.cs b/src/API/Grand.Api/Commands/Handlers/Common/GenerateTokenWebCommandHandler.cs
index 7005c95b6..a1294fdf6 100644
--- a/src/API/Grand.Api/Commands/Handlers/Common/GenerateTokenWebCommandHandler.cs
+++ b/src/API/Grand.Api/Commands/Handlers/Common/GenerateTokenWebCommandHandler.cs
@@ -8,25 +8,25 @@ namespace Grand.Api.Commands.Handlers.Common
{
public class GenerateTokenWebCommandHandler : IRequestHandler<GenerateTokenWebCommand, string>
{
- private readonly FrontendAPIConfig _frontentApiConfig;
+ private readonly FrontendAPIConfig _frontendApiConfig;
public GenerateTokenWebCommandHandler(FrontendAPIConfig frontedApiConfig)
{
- _frontentApiConfig = frontedApiConfig;
+ _frontendApiConfig = frontedApiConfig;
}
public async Task<string> Handle(GenerateTokenWebCommand request, CancellationToken cancellationToken)
{
var token = new JwtTokenBuilder();
- token.AddSecurityKey(JwtSecurityKey.Create(_frontentApiConfig.SecretKey));
+ token.AddSecurityKey(JwtSecurityKey.Create(_frontendApiConfig.SecretKey));
- if (_frontentApiConfig.ValidateIssuer)
- token.AddIssuer(_frontentApiConfig.ValidIssuer);
- if (_frontentApiConfig.ValidateAudience)
- token.AddAudience(_frontentApiConfig.ValidAudience);
+ if (_frontendApiConfig.ValidateIssuer)
+ token.AddIssuer(_frontendApiConfig.ValidIssuer);
+ if (_frontendApiConfig.ValidateAudience)
+ token.AddAudience(_frontendApiConfig.ValidAudience);
token.AddClaims(request.Claims);
- token.AddExpiry(_frontentApiConfig.ExpiryInMinutes);
+ token.AddExpiry(_frontendApiConfig.ExpiryInMinutes);
token.Build();
return await Task.FromResult(token.Build().Value);
diff --git a/src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.cs b/src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.cs
index 5a2263ca1..0c259f1c0 100644
--- a/src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.cs
+++ b/src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.cs
@@ -69,7 +69,7 @@ namespace Grand.Api.Infrastructure
builder.AddJwtBearer(FrontendAPIConfig.Scheme, options =>
{
var config = new FrontendAPIConfig();
- configuration.GetSection("FrontentAPI").Bind(config);
+ configuration.GetSection("FrontendAPI").Bind(config);
options.TokenValidationParameters = new TokenValidationParameters {
ValidateIssuer = config.ValidateIssuer,
ValidateAudience = config.ValidateAudience,