2021-05-21 18:32:25 +00:00
|
|
|
|
using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
2021-07-10 02:47:40 +00:00
|
|
|
|
namespace MultiShop.Controllers
|
2021-05-21 18:32:25 +00:00
|
|
|
|
{
|
|
|
|
|
public class OidcConfigurationController : Controller
|
|
|
|
|
{
|
|
|
|
|
private readonly ILogger<OidcConfigurationController> _logger;
|
|
|
|
|
|
|
|
|
|
public OidcConfigurationController(IClientRequestParametersProvider clientRequestParametersProvider, ILogger<OidcConfigurationController> logger)
|
|
|
|
|
{
|
|
|
|
|
ClientRequestParametersProvider = clientRequestParametersProvider;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IClientRequestParametersProvider ClientRequestParametersProvider { get; }
|
|
|
|
|
|
|
|
|
|
[HttpGet("_configuration/{clientId}")]
|
|
|
|
|
public IActionResult GetClientRequestParameters([FromRoute]string clientId)
|
|
|
|
|
{
|
|
|
|
|
var parameters = ClientRequestParametersProvider.GetClientParameters(HttpContext, clientId);
|
|
|
|
|
return Ok(parameters);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|