21 lines
848 B
C#
21 lines
848 B
C#
namespace Distribution.Features.Auth;
|
|
|
|
/// <summary>
|
|
/// Typed HttpClient that proxies requests to the external Auth Service.
|
|
/// Registered via AddHttpClient<AuthServiceClient> in Program.cs.
|
|
/// BaseAddress is configured from AuthService:BaseUrl in appsettings.json.
|
|
///
|
|
/// TODO: Implement methods once Auth Service contract is agreed.
|
|
/// </summary>
|
|
public class AuthServiceClient(HttpClient http) : IAuthServiceClient
|
|
{
|
|
// TODO: implement proxy methods, e.g.:
|
|
//
|
|
// public async Task<AuthServiceResponse?> LoginAsync(LoginRequest request, CancellationToken ct)
|
|
// {
|
|
// var response = await http.PostAsJsonAsync("/TODO_AUTH_SERVICE_LOGIN_PATH", request, ct);
|
|
// if (!response.IsSuccessStatusCode) return null;
|
|
// return await response.Content.ReadFromJsonAsync<AuthServiceResponse>(ct);
|
|
// }
|
|
}
|