using System.Net; using System.Security.Claims; using System.Threading; using System.Threading.Tasks; namespace AMWD.Common.AspNetCore.Security.BasicAuthentication { /// /// Interface representing the validation of a basic authentication. /// public interface IBasicAuthenticationValidator { /// /// Gets the realm to use when requesting authentication. /// string Realm { get; } /// /// Validates a username and password for Basic Authentication. /// /// A username. /// A password. /// The remote client's IP address. /// A cancellation token. /// The validated user principal or null. Task ValidateAsync(string username, string password, IPAddress remoteAddress, CancellationToken cancellationToken = default); } }