2020-12-20 03:06:43 +02:00
|
|
|
|
using IdentityServer.Application.Services;
|
2021-11-13 17:17:13 +02:00
|
|
|
|
using IdentityServer.Application.Services.Abstractions;
|
2020-12-20 03:06:43 +02:00
|
|
|
|
using IdentityServer.Application.Stores;
|
2021-11-13 17:17:13 +02:00
|
|
|
|
using IdentityServer.Domain.Abstractions;
|
2020-12-20 03:06:43 +02:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace IdentityServer.Application
|
|
|
|
|
{
|
|
|
|
|
public static class DependencyInjectionExtensions
|
|
|
|
|
{
|
|
|
|
|
public static void AddApplicationServices(this IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.AddStores();
|
2021-11-13 17:17:13 +02:00
|
|
|
|
services.AddSingleton<IConfigProvider, ConfigProvider>();
|
2022-02-11 10:56:52 +02:00
|
|
|
|
services.AddSingleton<IHashingService, HashingService>();
|
2021-11-12 01:37:10 +02:00
|
|
|
|
services.AddSingleton<ITokenService, TokenService>();
|
2020-12-20 03:06:43 +02:00
|
|
|
|
services.AddScoped<IUserService, UserService>();
|
2021-11-13 20:58:17 +02:00
|
|
|
|
services.AddSingleton<IBehaviorService, BehaviorService>();
|
2020-12-20 03:06:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static void AddStores(this IServiceCollection services)
|
|
|
|
|
{
|
2021-11-13 17:17:13 +02:00
|
|
|
|
services.AddSingleton<ITokenStore, TokenStore>();
|
2020-12-20 03:06:43 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|