Skip to content

Add support for custom SignalR hubs#2091

Merged
jeremydmiller merged 2 commits intoJasperFx:mainfrom
PerfectlyNormal:feat/custom-signalr-hub
Feb 3, 2026
Merged

Add support for custom SignalR hubs#2091
jeremydmiller merged 2 commits intoJasperFx:mainfrom
PerfectlyNormal:feat/custom-signalr-hub

Conversation

@PerfectlyNormal
Copy link
Contributor

A start at allowing custom hubs in Wolverine.
Tested using the WolverineChat sample project.

Basically do opts.UseSignalR<MyCustomHub> and app.MapWolverineSignalRHub<MyCustomHub>()
where MyCustomHub inherits from WolverineHub. The old extensions for UseSignalR and MapWolverineSignalRHub remains and uses the default WolverineHub

I made WolverineHub.ReceiveMessage virtual to allow customization as well.
(And hopefully people remember to call base.ReceiveMessage as well...)

There's still no support for a hub that uses [Authorize] or has other ways of authenticating.
I was planning on looking into that later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants