29 lines
1.0 KiB
C#
29 lines
1.0 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Distribution.Features.Auth;
|
|
|
|
/// <summary>
|
|
/// 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.
|
|
/// </summary>
|
|
[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<IActionResult> Login()
|
|
{
|
|
// TODO: accept login request shape from Auth Service contract,
|
|
// forward to authServiceClient, relay response (token / session) back.
|
|
return Task.FromResult<IActionResult>(StatusCode(501, new { error = "Auth integration not yet implemented." }));
|
|
}
|
|
|
|
// TODO: add further endpoints as needed (refresh, logout, etc.)
|
|
}
|