diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs
index 2f60d01a9..afa3721b8 100644
--- a/Emby.Server.Implementations/Session/SessionManager.cs
+++ b/Emby.Server.Implementations/Session/SessionManager.cs
@@ -95,12 +95,6 @@ namespace Emby.Server.Implementations.Session
_deviceManager.DeviceOptionsUpdated += OnDeviceManagerDeviceOptionsUpdated;
}
- ///
- public event EventHandler> AuthenticationFailed;
-
- ///
- public event EventHandler> AuthenticationSucceeded;
-
///
/// Occurs when playback has started.
///
@@ -1468,7 +1462,7 @@ namespace Emby.Server.Implementations.Session
if (user is null)
{
- AuthenticationFailed?.Invoke(this, new GenericEventArgs(request));
+ await _eventManager.PublishAsync(new GenericEventArgs(request)).ConfigureAwait(false);
throw new AuthenticationException("Invalid username or password entered.");
}
@@ -1504,8 +1498,7 @@ namespace Emby.Server.Implementations.Session
ServerId = _appHost.SystemId
};
- AuthenticationSucceeded?.Invoke(this, new GenericEventArgs(returnResult));
-
+ await _eventManager.PublishAsync(new GenericEventArgs(returnResult)).ConfigureAwait(false);
return returnResult;
}
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs
index ae3fcad29..19ac007b9 100644
--- a/Jellyfin.Server.Implementations/Users/UserManager.cs
+++ b/Jellyfin.Server.Implementations/Users/UserManager.cs
@@ -157,7 +157,9 @@ namespace Jellyfin.Server.Implementations.Users
await UpdateUserInternalAsync(dbContext, user).ConfigureAwait(false);
}
- OnUserUpdated?.Invoke(this, new GenericEventArgs(user));
+ var eventArgs = new UserUpdatedEventArgs(user);
+ await _eventManager.PublishAsync(eventArgs).ConfigureAwait(false);
+ OnUserUpdated?.Invoke(this, eventArgs);
}
///
diff --git a/MediaBrowser.Controller/Session/ISessionManager.cs b/MediaBrowser.Controller/Session/ISessionManager.cs
index b16399598..eefc5d222 100644
--- a/MediaBrowser.Controller/Session/ISessionManager.cs
+++ b/MediaBrowser.Controller/Session/ISessionManager.cs
@@ -57,16 +57,6 @@ namespace MediaBrowser.Controller.Session
///
event EventHandler CapabilitiesChanged;
- ///
- /// Occurs when [authentication failed].
- ///
- event EventHandler> AuthenticationFailed;
-
- ///
- /// Occurs when [authentication succeeded].
- ///
- event EventHandler> AuthenticationSucceeded;
-
///
/// Gets the sessions.
///