using Microsoft.AspNetCore.Mvc;
namespace Distribution.Features.Auth;
///
/// Proxies all authentication traffic from the Next.js frontend to the
/// external Auth Service. The frontend must never call the Auth Service
/// directly — all auth goes through this controller.
///
/// TODO: Implement endpoints once Auth Service contract is agreed.
///
[ApiController]
[Route("api/auth")]
public class AuthController(IAuthServiceClient authServiceClient) : ControllerBase
{
// TODO: replace stub endpoints below with real proxy calls once
// the Auth Service API contract is finalised.
[HttpPost("login")]
public Task Login()
{
// TODO: accept login request shape from Auth Service contract,
// forward to authServiceClient, relay response (token / session) back.
return Task.FromResult(StatusCode(501, new { error = "Auth integration not yet implemented." }));
}
// TODO: add further endpoints as needed (refresh, logout, etc.)
}