tuitio/IdentityServer.Application/DependencyInjectionExtensio...

21 lines
603 B
C#

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.AddScoped<IUserService, UserService>();
}
private static void AddStores(this IServiceCollection services)
{
services.AddSingleton<ISecurityStore, SecurityStore>();
}
}
}