diff --git a/src/VirtoCommerce.Platform.Security/Services/UserLockedOutValidator.cs b/src/VirtoCommerce.Platform.Security/Services/BaseUserSignInValidator.cs similarity index 96% rename from src/VirtoCommerce.Platform.Security/Services/UserLockedOutValidator.cs rename to src/VirtoCommerce.Platform.Security/Services/BaseUserSignInValidator.cs index 16dcd775f3c..b6dadb5528d 100644 --- a/src/VirtoCommerce.Platform.Security/Services/UserLockedOutValidator.cs +++ b/src/VirtoCommerce.Platform.Security/Services/BaseUserSignInValidator.cs @@ -7,7 +7,7 @@ namespace VirtoCommerce.Platform.Security.Services { - public class TokenLoginValidator : ITokenLoginValidator + public class BaseUserSignInValidator : IUserSignInValidator { public int Priority { get; set; } diff --git a/src/VirtoCommerce.Platform.Security/Services/ITokenLoginValidator.cs b/src/VirtoCommerce.Platform.Security/Services/IUserSignInValidator.cs similarity index 91% rename from src/VirtoCommerce.Platform.Security/Services/ITokenLoginValidator.cs rename to src/VirtoCommerce.Platform.Security/Services/IUserSignInValidator.cs index dce5de88e74..4ab00ce05b6 100644 --- a/src/VirtoCommerce.Platform.Security/Services/ITokenLoginValidator.cs +++ b/src/VirtoCommerce.Platform.Security/Services/IUserSignInValidator.cs @@ -6,7 +6,7 @@ namespace VirtoCommerce.Platform.Security.Services { - public interface ITokenLoginValidator + public interface IUserSignInValidator { public int Priority { get; set; } diff --git a/src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs b/src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs index fe86e5a3451..f4fa431c119 100644 --- a/src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs +++ b/src/VirtoCommerce.Platform.Web/Controllers/Api/AuthorizationController.cs @@ -32,7 +32,7 @@ public class AuthorizationController : Controller private readonly UserManager _userManager; private readonly PasswordLoginOptions _passwordLoginOptions; private readonly IEventPublisher _eventPublisher; - private readonly IEnumerable _tokenLoginValidators; + private readonly IEnumerable _userSignInValidators; private UserManager UserManager => _signInManager.UserManager; @@ -43,7 +43,7 @@ public AuthorizationController( UserManager userManager, IOptions passwordLoginOptions, IEventPublisher eventPublisher, - IEnumerable tokenLoginValidators) + IEnumerable userSignInValidators) { _applicationManager = applicationManager; _identityOptions = identityOptions.Value; @@ -51,7 +51,7 @@ public AuthorizationController( _signInManager = signInManager; _userManager = userManager; _eventPublisher = eventPublisher; - _tokenLoginValidators = tokenLoginValidators; + _userSignInValidators = userSignInValidators; } #region Password, authorization code and refresh token flows @@ -106,7 +106,7 @@ public async Task Exchange() { "storeId", openIdConnectRequest.Scope }, }; - foreach (var loginValidation in _tokenLoginValidators.OrderByDescending(x => x.Priority)) + foreach (var loginValidation in _userSignInValidators.OrderByDescending(x => x.Priority)) { var validationErrors = await loginValidation.ValidateUserAsync(user, result, context); var error = validationErrors.FirstOrDefault(); diff --git a/src/VirtoCommerce.Platform.Web/Security/ServiceCollectionExtensions.cs b/src/VirtoCommerce.Platform.Web/Security/ServiceCollectionExtensions.cs index d674fe509d3..975b2ef976f 100644 --- a/src/VirtoCommerce.Platform.Web/Security/ServiceCollectionExtensions.cs +++ b/src/VirtoCommerce.Platform.Web/Security/ServiceCollectionExtensions.cs @@ -61,7 +61,7 @@ public static IServiceCollection AddSecurityServices(this IServiceCollection ser services.AddTransient(); - services.AddTransient(); + services.AddTransient(); return services; }