20 lines
635 B
C#
20 lines
635 B
C#
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>();
|
|
}
|
|
}
|