26 lines
903 B
C#
26 lines
903 B
C#
using IdentityServer.Application.Services;
|
|
using IdentityServer.Application.Services.Abstractions;
|
|
using IdentityServer.Application.Stores;
|
|
using IdentityServer.Domain.Abstractions;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace IdentityServer.Application
|
|
{
|
|
public static class DependencyInjectionExtensions
|
|
{
|
|
public static void AddApplicationServices(this IServiceCollection services)
|
|
{
|
|
services.AddStores();
|
|
services.AddSingleton<IConfigProvider, ConfigProvider>();
|
|
services.AddSingleton<ITokenService, TokenService>();
|
|
services.AddScoped<IUserService, UserService>();
|
|
services.AddSingleton<IBehaviorService, BehaviorService>();
|
|
}
|
|
|
|
private static void AddStores(this IServiceCollection services)
|
|
{
|
|
services.AddSingleton<ITokenStore, TokenStore>();
|
|
}
|
|
}
|
|
}
|