tuitio/IdentityServer.Application/DependencyInjectionExtensio...

22 lines
669 B
C#
Raw Normal View History

2020-12-20 03:06:43 +02:00
using IdentityServer.Application.Services;
using IdentityServer.Application.Stores;
using Microsoft.Extensions.DependencyInjection;
namespace IdentityServer.Application
{
public static class DependencyInjectionExtensions
{
public static void AddApplicationServices(this IServiceCollection services)
{
services.AddStores();
services.AddSingleton<ITokenService, TokenService>();
2020-12-20 03:06:43 +02:00
services.AddScoped<IUserService, UserService>();
}
private static void AddStores(this IServiceCollection services)
{
services.AddSingleton<ISecurityStore, SecurityStore>();
}
}
}