using ERPCore.Dtos.Auth;

namespace ERPCore.Services.Auth;

/// <summary>
/// Carries a freshly issued AuthHex session from a Services/Auth method back to
/// AuthController. Never serialized directly — the controller pulls
/// AccessToken/RefreshToken into httpOnly cookies (see AuthCookieWriter) and
/// returns only <see cref="Body"/> in the response.
/// </summary>
public sealed class AuthSessionResult
{
    public required string AccessToken { get; init; }
    public required string RefreshToken { get; init; }
    public required AuthSessionResponse Body { get; init; }
}

/// <summary>Same purpose as <see cref="AuthSessionResult"/>, for the two OTP-verify
/// flows whose body also carries ReferenceNumber/Verified alongside the user/session.</summary>
public sealed class OtpAuthSessionResult
{
    public required string AccessToken { get; init; }
    public required string RefreshToken { get; init; }
    public required OtpLoginVerifiedResponse Body { get; init; }
}
