Skip to content

Commit

Permalink
fix: naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ksavosteev committed Feb 19, 2025
1 parent 57bc7f7 commit bd13642
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace VirtoCommerce.CustomerModule.Data.OpenIddict;

public class CurrentOrganizationIdTokenHandler(IMemberService memberService) : ITokenRequestHandler
public class CurrentOrganizationIdRequestHandler(IMemberService memberService) : ITokenRequestHandler
{
public async Task HandleAsync(ApplicationUser user, TokenRequestContext context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,4 @@ public static class ErrorDescriber
Code = nameof(InvalidOrganizationId).ToSnakeCase(),
ErrorDescription = $"Access denied. You cannot switch to organization '{organizationId}'.",
};


public static TokenResponse InvalidParamOrganizationId() => new()
{
Error = Errors.InvalidRequest,
Code = nameof(InvalidParamOrganizationId).ToSnakeCase(),
ErrorDescription = $"You cannot use 'impersonate' grant and 'organization_id' param.",
};
}
2 changes: 1 addition & 1 deletion src/VirtoCommerce.CustomerModule.Web/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void Initialize(IServiceCollection serviceCollection)

serviceCollection.AddSingleton<ITokenRequestValidator, OrganizationIdRequestValidator>();
serviceCollection.AddSingleton<ITokenClaimProvider, OrganizationIdClaimProvider>();
serviceCollection.AddSingleton<ITokenRequestHandler, CurrentOrganizationIdTokenHandler>();
serviceCollection.AddSingleton<ITokenRequestHandler, CurrentOrganizationIdRequestHandler>();
}

public void PostInitialize(IApplicationBuilder appBuilder)
Expand Down

0 comments on commit bd13642

Please sign in to comment.