using Baya.Application.Contracts.Common;

namespace Baya.Infrastructure.Identity.Identity.CurrentUser;

/// <summary>
/// Null-object <see cref="ICurrentUser"/> for non-HTTP contexts (background jobs, tests) — reports an
/// unauthenticated caller so audit stamping leaves the user fields null rather than failing.
/// </summary>
public sealed class NullCurrentUser : ICurrentUser
{
    public int? UserId => null;

    public bool IsAuthenticated => false;

    public IReadOnlyList<string> Roles => [];

    public string IpAddress => null;
}
