diff --git a/src/VirtoCommerce.CustomerModule.Data/OpenIddict/CurrentOrganizationIdTokenHandler.cs b/src/VirtoCommerce.CustomerModule.Data/OpenIddict/CurrentOrganizationIdRequestHandler.cs similarity index 93% rename from src/VirtoCommerce.CustomerModule.Data/OpenIddict/CurrentOrganizationIdTokenHandler.cs rename to src/VirtoCommerce.CustomerModule.Data/OpenIddict/CurrentOrganizationIdRequestHandler.cs index 86f7ec73..e3cb4f87 100644 --- a/src/VirtoCommerce.CustomerModule.Data/OpenIddict/CurrentOrganizationIdTokenHandler.cs +++ b/src/VirtoCommerce.CustomerModule.Data/OpenIddict/CurrentOrganizationIdRequestHandler.cs @@ -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) { diff --git a/src/VirtoCommerce.CustomerModule.Data/OpenIddict/ErrorDescriber.cs b/src/VirtoCommerce.CustomerModule.Data/OpenIddict/ErrorDescriber.cs index 77c5d4d3..13661d18 100644 --- a/src/VirtoCommerce.CustomerModule.Data/OpenIddict/ErrorDescriber.cs +++ b/src/VirtoCommerce.CustomerModule.Data/OpenIddict/ErrorDescriber.cs @@ -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.", - }; } diff --git a/src/VirtoCommerce.CustomerModule.Web/Module.cs b/src/VirtoCommerce.CustomerModule.Web/Module.cs index e600e53e..7a221b54 100644 --- a/src/VirtoCommerce.CustomerModule.Web/Module.cs +++ b/src/VirtoCommerce.CustomerModule.Web/Module.cs @@ -112,7 +112,7 @@ public void Initialize(IServiceCollection serviceCollection) serviceCollection.AddSingleton(); serviceCollection.AddSingleton(); - serviceCollection.AddSingleton(); + serviceCollection.AddSingleton(); } public void PostInitialize(IApplicationBuilder appBuilder)