tuitio/IdentityServer.Application/Services/ConfigProvider.cs

20 lines
635 B
C#
Raw Normal View History

2021-11-13 17:17:13 +02:00
using IdentityServer.Domain.Abstractions;
using IdentityServer.Domain.Models.Config;
using Microsoft.Extensions.Configuration;
namespace IdentityServer.Application.Services
{
internal class ConfigProvider : IConfigProvider
{
private readonly IConfiguration _configuration;
public ConfigProvider(IConfiguration configuration)
{
_configuration=configuration;
}
public RestrictionsConfig Restrictions => _configuration.GetSection("Restrictions").Get<RestrictionsConfig>();
public TokenConfig Token => _configuration.GetSection("Token").Get<TokenConfig>();
}
}