From 1f2992cadc2bea415c42090bf0891c015ab36282 Mon Sep 17 00:00:00 2001 From: support Date: Tue, 29 Mar 2022 17:31:14 +0200 Subject: [PATCH] Typo fix #249 --- .../Common/GenerateTokenWebCommandHandler.cs | 16 ++++++++-------- .../Infrastructure/ApiAuthenticationRegistrar.cs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) 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 { - private readonly FrontendAPIConfig _frontentApiConfig; + private readonly FrontendAPIConfig _frontendApiConfig; public GenerateTokenWebCommandHandler(FrontendAPIConfig frontedApiConfig) { - _frontentApiConfig = frontedApiConfig; + _frontendApiConfig = frontedApiConfig; } public async Task 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 @@ public void AddAuthentication(AuthenticationBuilder builder, IConfiguration conf 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,