using MealPlan.Api.DTOs.Auth; namespace MealPlan.Api.Services; /// Outcome of an auth operation. Avoids throwing for expected failures (bad credentials, etc.). public class AuthResult { public bool Succeeded { get; private init; } public string? Error { get; private init; } public TokenResponseDto? Tokens { get; private init; } public static AuthResult Success(TokenResponseDto tokens) => new() { Succeeded = true, Tokens = tokens }; public static AuthResult Fail(string error) => new() { Succeeded = false, Error = error }; }