Skip to content

Commit

Permalink
Add authorization to WorkflowInstanceHub
Browse files Browse the repository at this point in the history
This commit decorates the WorkflowInstanceHub class with the [Authorize] attribute to ensure that only authorized users can connect to the SignalR hub. This change improves the security of the workflow event notification system.
  • Loading branch information
sfmskywalker committed Oct 31, 2024
1 parent c3b6dec commit 91b7e0c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Elsa.Workflows.Api.RealTime.Contracts;
using Elsa.Workflows.Runtime.Contracts;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.SignalR;

namespace Elsa.Workflows.Api.RealTime.Hubs;
Expand All @@ -9,6 +10,7 @@ namespace Elsa.Workflows.Api.RealTime.Hubs;
/// Represents a SignalR hub for receiving workflow events on the client.
/// </summary>
[PublicAPI]
[Authorize]
public class WorkflowInstanceHub : Hub<IWorkflowInstanceClient>
{
private readonly IWorkflowRuntime _workflowRuntime;
Expand Down

0 comments on commit 91b7e0c

Please sign in to comment.