2025-03-25 14:00:19 +01:00

35 lines
874 B
C#

using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Authorization;
using DigitalData.UserManager.Application.DTOs.Auth;
namespace DigitalData.UserManager.API.Controllers;
[Route("api/Auth")]
[ApiController]
[Tags("Auth")]
public class PlaceholderAuthController : ControllerBase
{
[Authorize]
[HttpGet("check")]
public IActionResult CheckAuthentication() => Ok();
[AllowAnonymous]
[HttpPost("login")]
public Task<IActionResult> Login([FromBody] LogInDto login) => throw new NotImplementedException();
[Authorize]
[HttpGet("user")]
public Task<IActionResult> GetUserWithClaims() => throw new NotImplementedException();
[Authorize]
[HttpPost("logout")]
public IActionResult Logout()
{
Response.Cookies.Delete("AuthToken", new()
{
Path = "/"
});
return Ok();
}
}