Skip to content

Commit 1f2992c

Browse files
author
support
committed
Typo fix #249
1 parent 205cbff commit 1f2992c

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/API/Grand.Api/Commands/Handlers/Common/GenerateTokenWebCommandHandler.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ namespace Grand.Api.Commands.Handlers.Common
88
{
99
public class GenerateTokenWebCommandHandler : IRequestHandler<GenerateTokenWebCommand, string>
1010
{
11-
private readonly FrontendAPIConfig _frontentApiConfig;
11+
private readonly FrontendAPIConfig _frontendApiConfig;
1212

1313
public GenerateTokenWebCommandHandler(FrontendAPIConfig frontedApiConfig)
1414
{
15-
_frontentApiConfig = frontedApiConfig;
15+
_frontendApiConfig = frontedApiConfig;
1616
}
1717

1818
public async Task<string> Handle(GenerateTokenWebCommand request, CancellationToken cancellationToken)
1919
{
2020
var token = new JwtTokenBuilder();
21-
token.AddSecurityKey(JwtSecurityKey.Create(_frontentApiConfig.SecretKey));
21+
token.AddSecurityKey(JwtSecurityKey.Create(_frontendApiConfig.SecretKey));
2222

23-
if (_frontentApiConfig.ValidateIssuer)
24-
token.AddIssuer(_frontentApiConfig.ValidIssuer);
25-
if (_frontentApiConfig.ValidateAudience)
26-
token.AddAudience(_frontentApiConfig.ValidAudience);
23+
if (_frontendApiConfig.ValidateIssuer)
24+
token.AddIssuer(_frontendApiConfig.ValidIssuer);
25+
if (_frontendApiConfig.ValidateAudience)
26+
token.AddAudience(_frontendApiConfig.ValidAudience);
2727

2828
token.AddClaims(request.Claims);
29-
token.AddExpiry(_frontentApiConfig.ExpiryInMinutes);
29+
token.AddExpiry(_frontendApiConfig.ExpiryInMinutes);
3030
token.Build();
3131

3232
return await Task.FromResult(token.Build().Value);

src/API/Grand.Api/Infrastructure/ApiAuthenticationRegistrar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void AddAuthentication(AuthenticationBuilder builder, IConfiguration conf
6969
builder.AddJwtBearer(FrontendAPIConfig.Scheme, options =>
7070
{
7171
var config = new FrontendAPIConfig();
72-
configuration.GetSection("FrontentAPI").Bind(config);
72+
configuration.GetSection("FrontendAPI").Bind(config);
7373
options.TokenValidationParameters = new TokenValidationParameters {
7474
ValidateIssuer = config.ValidateIssuer,
7575
ValidateAudience = config.ValidateAudience,

0 commit comments

Comments
 (0)