diff options
| author | dafo90 <41897414+dafo90@users.noreply.github.com> | 2020-04-06 22:23:53 +0200 |
|---|---|---|
| committer | dafo90 <41897414+dafo90@users.noreply.github.com> | 2020-04-06 22:23:53 +0200 |
| commit | 62b0db59aa5a378b49044be5c3c02c03b0ed0de1 (patch) | |
| tree | a03424db4c3252670b6c66a7c11316cf21af4d3d /Emby.Server.Implementations/Library/UserManager.cs | |
| parent | 2fb9e36493a2d6be0f2e7a542caf027075892833 (diff) | |
Fix Authentication request log
Diffstat (limited to 'Emby.Server.Implementations/Library/UserManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserManager.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index d4d97345b..9164135b4 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -264,6 +264,7 @@ namespace Emby.Server.Implementations.Library { if (string.IsNullOrWhiteSpace(username)) { + _logger.LogInformation("Authentication request without username has been denied (IP: {IP}).", remoteEndPoint); throw new ArgumentNullException(nameof(username)); } @@ -319,6 +320,7 @@ namespace Emby.Server.Implementations.Library if (user == null) { + _logger.LogInformation("Authentication request for {UserName} has been denied (IP: {IP}).", username, remoteEndPoint); throw new AuthenticationException("Invalid username or password entered."); } @@ -351,14 +353,14 @@ namespace Emby.Server.Implementations.Library } ResetInvalidLoginAttemptCount(user); + _logger.LogInformation("Authentication request for {UserName} has succeeded.", user.Name); } else { IncrementInvalidLoginAttemptCount(user); + _logger.LogInformation("Authentication request for {UserName} has been denied (IP: {IP}).", user.Name, remoteEndPoint); } - _logger.LogInformation("Authentication request for {0} {1} (IP: {2}).", user.Name, success ? "has succeeded" : "has been denied", remoteEndPoint); - return success ? user : null; } |
