title: Passing connection token is secure or hacky from signalr js client side to hub function
body: <p>i read this article <a href="http://www.asp.net/signalr/overview/security/introduction-to-security#connectiontoken" rel="noreferrer">http://www.asp.net/signalr/overview/security/introduction-to-security#connectiontoken</a></p>
  
  <h2>JS Client</h2>
  
  <pre><code>$.connection.hub.qs = { "token" : tokenValue };
  $.connection.hub.start().done(function() { /* ... */ });
  </code></pre>
  
  <h2>.NET Client</h2>
  
  <pre><code>var connection = new HubConnection("http://foo/",
                                     new Dictionary&lt;string, string&gt;
                                     {
                                         { "token", tokenValue }
                                     });
  </code></pre>
  
  <p>Inside a Hub you can access the community name through the Context:</p>
  
  <pre><code>Context.QueryString["token"]
  </code></pre>
  
  <hr>
  
  <h2>Setting Headers on the .NET Client</h2>
  
  <pre><code>var connection = new HubConnection("http://foo/");
  connection.Headers.Add("token", tokenValue);
  </code></pre>
  
  <p>i notice that we can pass some token value from client side to hub function as query string.....if i pass the anything as query string is not safe. so tell me best way to pass token value in secured way from client to hub function as a result no one can hack/change or reuse that token value. </p>
  
  <p>one guy said <code>SignalR uses encryption and a digital signature to protect the connection token.</code>.
  so please tell me is it true that signalr first encrypt token value and then pass from client side to hub?</p>
  
  <p>suggest me how one can pass token value to hub in secure way. thanks</p>