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();
|
2021-11-12 01:37:10 +02:00
|
|
|
|
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>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|