astral-api/Astral.Services/Interfaces/IEmailDomainBlacklistService.cs

24 lines
747 B
C#
Raw Permalink Normal View History

2024-12-11 21:36:30 +01:00
// <copyright file="IEmailDomainBlacklistService.cs" company="alveus.dev">
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
// </copyright>
namespace Astral.Services.Interfaces;
/// <summary>
/// A service providing a blacklist of email domains to prevent abuse.
/// </summary>
public interface IEmailDomainBlacklistService
{
/// <summary>
/// Update the blacklist.
/// </summary>
Task UpdateBlacklist();
/// <summary>
/// Check the email against the blacklist.
/// </summary>
/// <param name="emailAddress">The email address to test.</param>
/// <returns>True if the email address' domain is in the blacklist.</returns>
Task<bool> CheckBlacklist(string emailAddress);
}