I am reading this article http://www.asp.net/signalr/overview/security/introduction-to-security#connectiontoken
JS Client
$.connection.hub.qs = { "token" : tokenValue }; $.connection.hub.start().done(function() { });
.NET Client
var connection = new HubConnection("http://foo/", new Dictionary<string, string> { { "token", tokenValue } });
Inside the hub, you can access the community name through the context:
Context.QueryString["token"]
Setting Headers in .NET Client
var connection = new HubConnection("http://foo/"); connection.Headers.Add("token", tokenValue);
I notice that we can pass some value of the token from the client side to the hub function as a query string ..... if I pass anything because the query string is unsafe. so tell me the best way to transfer the value of the token in a protected form from the client to the hub function, as a result, no one can crack / change or reuse the value of the token.
one guy said SignalR uses encryption and a digital signature to protect the connection token. . so please tell me, is it true that signalr first encrypts the value of the token and then goes from the client side to the hub?
offer me how to safely transfer the value of the token to the hub. thanks
source share