DD.Keycloak.Client/DD.Keycloak.Client.Web/Controllers/WeatherForecastController.cs

29 lines
756 B
C#
Raw Normal View History

2025-01-15 17:09:56 +05:00
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;
}
}