diff --git a/src/Core/Services/AuthService.cs b/src/Core/Services/AuthService.cs index 33e47b9af..4092fbace 100644 --- a/src/Core/Services/AuthService.cs +++ b/src/Core/Services/AuthService.cs @@ -26,6 +26,7 @@ namespace Bit.Core.Services private readonly IMessagingService _messagingService; private readonly IKeyConnectorService _keyConnectorService; private readonly IPasswordGenerationService _passwordGenerationService; + private readonly IPolicyService _policyService; private readonly bool _setCryptoKeys; private readonly LazyResolve _watchDeviceService = new LazyResolve(); @@ -44,7 +45,7 @@ namespace Bit.Core.Services IVaultTimeoutService vaultTimeoutService, IKeyConnectorService keyConnectorService, IPasswordGenerationService passwordGenerationService, - bool setCryptoKeys = true) + IPolicyService policyService, bool setCryptoKeys = true) { _cryptoService = cryptoService; _cryptoFunctionService = cryptoFunctionService; @@ -57,6 +58,7 @@ namespace Bit.Core.Services _messagingService = messagingService; _keyConnectorService = keyConnectorService; _passwordGenerationService = passwordGenerationService; + _policyService = policyService; _setCryptoKeys = setCryptoKeys; TwoFactorProviders = new Dictionary(); diff --git a/src/Core/Utilities/ServiceContainer.cs b/src/Core/Utilities/ServiceContainer.cs index eb09bf58f..6a183f193 100644 --- a/src/Core/Utilities/ServiceContainer.cs +++ b/src/Core/Utilities/ServiceContainer.cs @@ -79,7 +79,7 @@ namespace Bit.Core.Utilities var totpService = new TotpService(cryptoFunctionService); var authService = new AuthService(cryptoService, cryptoFunctionService, apiService, stateService, tokenService, appIdService, i18nService, platformUtilsService, messagingService, vaultTimeoutService, - keyConnectorService, passwordGenerationService); + keyConnectorService, passwordGenerationService, policyService); var exportService = new ExportService(folderService, cipherService, cryptoService); var auditService = new AuditService(cryptoFunctionService, apiService); var environmentService = new EnvironmentService(apiService, stateService);