using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Manager.Framework.Business { public class ProfileLogic { private readonly ILogger _logger; public ProfileLogic(ILogger logger) : base() { _logger = logger; } public bool Authenticate(string email, string password) { if (string.IsNullOrWhiteSpace(email)) { _logger.LogError($"Authenticate error: No e-mail provided"); throw new UnauthorizedAccessException("Authentication error"); } if (string.IsNullOrEmpty(password)) { _logger.LogError($"Authenticate error: No password provided"); throw new UnauthorizedAccessException("Authentication error"); } return true; } } }