using Microsoft.AspNetCore.Mvc;

namespace eSPJ.Controllers.SpjDriverUpstController;

[Route("upst")]
public class AuthController : Controller
{
    private readonly IConfiguration _configuration;

    public AuthController(IConfiguration configuration)
    {
        _configuration = configuration;
    }

    [HttpPost("logout")]
    [HttpGet("logout")]
    public IActionResult Logout()
    {
        var logoutUrl = _configuration["SSO:LogoutUrl"] ?? "/upst/mulai";
        return Redirect(logoutUrl);
    }
}
