You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
524 B
24 lines
524 B
using Microsoft.AspNetCore.Mvc;
|
|
using OAuthServer.Services;
|
|
|
|
namespace OAuthServer.Controllers;
|
|
|
|
[ApiController]
|
|
public class OAuthController : ControllerBase
|
|
{
|
|
private readonly ILogger<OAuthController> _logger;
|
|
private readonly JwtService _jwt;
|
|
|
|
public OAuthController(ILogger<OAuthController> logger, JwtService jwt)
|
|
{
|
|
_logger = logger;
|
|
_jwt = jwt;
|
|
}
|
|
|
|
[HttpPost]
|
|
[Route("get-token")]
|
|
public ActionResult GenerateToken()
|
|
{
|
|
return Ok(_jwt.GenerateToken());
|
|
}
|
|
} |