using Bit.Core.Auth.Sso; using Bit.Core.Auth.UserFeatures.DeviceTrust; using Bit.Core.Auth.UserFeatures.EmergencyAccess.Commands; using Bit.Core.Auth.UserFeatures.EmergencyAccess.Interfaces; using Bit.Core.Auth.UserFeatures.Registration; using Bit.Core.Auth.UserFeatures.Registration.Implementations; using Bit.Core.Auth.UserFeatures.TdeOffboardingPassword.Interfaces; using Bit.Core.Auth.UserFeatures.TwoFactorAuth; using Bit.Core.Auth.UserFeatures.TwoFactorAuth.Interfaces; using Bit.Core.Auth.UserFeatures.UserMasterPassword; using Bit.Core.Auth.UserFeatures.UserMasterPassword.Interfaces; using Bit.Core.Auth.UserFeatures.WebAuthnLogin; using Bit.Core.Auth.UserFeatures.WebAuthnLogin.Implementations; using Bit.Core.KeyManagement.UserKey; using Bit.Core.KeyManagement.UserKey.Implementations; using Bit.Core.Services; using Bit.Core.Settings; using Microsoft.Extensions.DependencyInjection; namespace Bit.Core.Auth.UserFeatures; public static class UserServiceCollectionExtensions { public static void AddUserServices(this IServiceCollection services, IGlobalSettings globalSettings) { services.AddScoped(); services.AddDeviceTrustCommands(); services.AddEmergencyAccessCommands(); services.AddUserPasswordCommands(); services.AddUserRegistrationCommands(); services.AddWebAuthnLoginCommands(); services.AddTdeOffboardingPasswordCommands(); services.AddTwoFactorQueries(); services.AddSsoQueries(); } public static void AddDeviceTrustCommands(this IServiceCollection services) { services.AddScoped(); } private static void AddEmergencyAccessCommands(this IServiceCollection services) { services.AddScoped(); } public static void AddUserKeyCommands(this IServiceCollection services, IGlobalSettings globalSettings) { services.AddScoped(); } private static void AddUserPasswordCommands(this IServiceCollection services) { services.AddScoped(); services.AddScoped(); services.AddScoped(); } private static void AddTdeOffboardingPasswordCommands(this IServiceCollection services) { services.AddScoped(); } private static void AddUserRegistrationCommands(this IServiceCollection services) { services.AddScoped(); services.AddScoped(); } private static void AddWebAuthnLoginCommands(this IServiceCollection services) { services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); } private static void AddTwoFactorQueries(this IServiceCollection services) { services.AddScoped(); } private static void AddSsoQueries(this IServiceCollection services) { services.AddScoped(); } }