29 lines
756 B
C#
29 lines
756 B
C#
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
||
|
namespace DD.Keycloak.Client.Web.Controllers;
|
||
|
[ApiController]
|
||
|
[Route("[controller]")]
|
||
|
public class WeatherForecastController : ControllerBase
|
||
|
{
|
||
|
private static readonly string[] Summaries = new[]
|
||
|
{
|
||
|
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||
|
};
|
||
|
|
||
|
private readonly ILogger<WeatherForecastController> _logger;
|
||
|
private readonly IKeycloakClient _test;
|
||
|
|
||
|
public WeatherForecastController(ILogger<WeatherForecastController> logger, IKeycloakClient test)
|
||
|
{
|
||
|
_logger = logger;
|
||
|
_test = test;
|
||
|
}
|
||
|
|
||
|
[HttpGet]
|
||
|
public async Task<string> Get()
|
||
|
{
|
||
|
var token = await _test.GetToken();
|
||
|
return token;
|
||
|
}
|
||
|
}
|