I have a partial implementation of a Hub with no authentication implemented.
Today I spend my day searching for a way to force users to authenticate on SignalR Hub.
I also read the Microsoft documentation about the theme. https://docs.microsoft.com/en-us/aspnet/signalr/overview/security/hub-authorization
The problem is that I don't understand you I, as a web client, can connect to a remote SignalR passing the details of authentication. I need to have a strong security at the SignalR
Can anyone help me to understand you I can archive that?
I'm working with ASP.NET MVC application and another project with, at same solution, that is a WCF Service. This WCF Service doesn't have access to the data of authenticated user. I think that is the problem. Because a few months ago I already have implemented
a SignalR Hub, at the ASP.NET MVC application and, at the Context, I have the data of the authenticated user.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
10 Posts
Authenticate user at SignalR service
Jul 04, 2017 09:22 PM|Leudassdf|LINK
Hi,
I have a partial implementation of a Hub with no authentication implemented.
Today I spend my day searching for a way to force users to authenticate on SignalR Hub.
I also read the Microsoft documentation about the theme. https://docs.microsoft.com/en-us/aspnet/signalr/overview/security/hub-authorization
The problem is that I don't understand you I, as a web client, can connect to a remote SignalR passing the details of authentication. I need to have a strong security at the SignalR
Can anyone help me to understand you I can archive that?
I'm working with ASP.NET MVC application and another project with, at same solution, that is a WCF Service. This WCF Service doesn't have access to the data of authenticated user. I think that is the problem. Because a few months ago I already have implemented a SignalR Hub, at the ASP.NET MVC application and, at the Context, I have the data of the authenticated user.
Hope that someone can help'me on that.
Leandro Rodrigues
Contributor
6730 Points
2715 Posts
Re: Authenticate user at SignalR service
Jul 06, 2017 02:38 AM|Eric Du|LINK
Hi Leudassdf,
According to your description, about how to connect .NET client and Server, please check this solution:
SignalR Secure Connection Between .NET Client and The Server:
https://stackoverflow.com/questions/9722983/signalr-secure-connection-between-net-client-and-the-server
Best Regards,
Eric Du
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
None
0 Points
10 Posts
Re: Authenticate user at SignalR service
Jul 06, 2017 07:16 PM|Leudassdf|LINK
Hi Eric Du,
Thanks for your reply.
At the StackOverflow question in provided link, they use a .NET client.
My goal is to use javascript to connect to the SignalR...
Contributor
6730 Points
2715 Posts
Re: Authenticate user at SignalR service
Aug 09, 2017 11:09 AM|Eric Du|LINK
Hi Leudassdf,
About how to call hub and pass token, please refer to the following tutorial:
Passing token through http Headers SignalR:
https://stackoverflow.com/questions/15528221/passing-token-through-http-headers-signalr
Best Regards,
Eric Du
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.