mirror of
https://github.com/bitwarden/server.git
synced 2025-06-19 18:38:03 -05:00
27 lines
881 B
C#
27 lines
881 B
C#
using Bit.Api.KeyManagement.Queries.Interfaces;
|
|
using Bit.Core.KeyManagement.Commands;
|
|
using Bit.Core.KeyManagement.Commands.Interfaces;
|
|
using Bit.Core.KeyManagement.Queries;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Bit.Core.KeyManagement;
|
|
|
|
public static class KeyManagementServiceCollectionExtensions
|
|
{
|
|
public static void AddKeyManagementServices(this IServiceCollection services)
|
|
{
|
|
services.AddKeyManagementCommands();
|
|
services.AddKeyManagementQueries();
|
|
}
|
|
|
|
private static void AddKeyManagementCommands(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IRegenerateUserAsymmetricKeysCommand, RegenerateUserAsymmetricKeysCommand>();
|
|
}
|
|
|
|
private static void AddKeyManagementQueries(this IServiceCollection services)
|
|
{
|
|
services.AddScoped<IUserAccountKeysQuery, UserAccountKeysQuery>();
|
|
}
|
|
}
|