mirror of
https://github.com/bitwarden/server.git
synced 2025-06-20 02:48:03 -05:00
Move registration to core
This commit is contained in:
parent
49c130f91f
commit
898fcba95f
@ -1,14 +0,0 @@
|
|||||||
using Bit.Api.KeyManagement.Queries.Interfaces;
|
|
||||||
using Bit.Core.KeyManagement.Queries;
|
|
||||||
|
|
||||||
namespace Bit.Api.KeyManagement;
|
|
||||||
|
|
||||||
#nullable enable
|
|
||||||
|
|
||||||
public static class Registrations
|
|
||||||
{
|
|
||||||
public static void AddKeyManagementQueries(this IServiceCollection services)
|
|
||||||
{
|
|
||||||
services.AddTransient<IUserAccountKeysQuery, UserAccountKeysQuery>();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +1,7 @@
|
|||||||
using Bit.Core.KeyManagement.Commands;
|
using Bit.Api.KeyManagement.Queries.Interfaces;
|
||||||
|
using Bit.Core.KeyManagement.Commands;
|
||||||
using Bit.Core.KeyManagement.Commands.Interfaces;
|
using Bit.Core.KeyManagement.Commands.Interfaces;
|
||||||
|
using Bit.Core.KeyManagement.Queries;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace Bit.Core.KeyManagement;
|
namespace Bit.Core.KeyManagement;
|
||||||
@ -9,10 +11,16 @@ public static class KeyManagementServiceCollectionExtensions
|
|||||||
public static void AddKeyManagementServices(this IServiceCollection services)
|
public static void AddKeyManagementServices(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddKeyManagementCommands();
|
services.AddKeyManagementCommands();
|
||||||
|
services.AddKeyManagementQueries();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AddKeyManagementCommands(this IServiceCollection services)
|
private static void AddKeyManagementCommands(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddScoped<IRegenerateUserAsymmetricKeysCommand, RegenerateUserAsymmetricKeysCommand>();
|
services.AddScoped<IRegenerateUserAsymmetricKeysCommand, RegenerateUserAsymmetricKeysCommand>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void AddKeyManagementQueries(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddScoped<IUserAccountKeysQuery, UserAccountKeysQuery>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user