_logger.LogInformation("Authentication request for {UserName} has been denied (IP: {IP}).",username,remoteEndPoint);
thrownewAuthenticationException("Invalid username or password entered.");
}
if(user.Policy.IsDisabled)
{
_logger.LogInformation("Authentication request for {UserName} has been denied because this account is currently disabled (IP: {IP}).",username,remoteEndPoint);
_logger.LogInformation("Authentication request for {UserName} forbidden: remote access disabled and user not in local network (IP: {IP}).",username,remoteEndPoint);
thrownewAuthenticationException("Forbidden.");
}
if(!user.IsParentalScheduleAllowed())
{
_logger.LogInformation("Authentication request for {UserName} is not allowed at this time due parental restrictions (IP: {IP}).",username,remoteEndPoint);
thrownewAuthenticationException("User is not allowed access at this time.");