title: Azure + SignalR - Secure hubs to different connection types
body: <p>I have two hubs in a web role, </p>
  
  <p>1) external facing hub meant to be consumed over https external endpoint for website users. </p>
  
  <p>2) intended to be connected to over http on an internal endpoint by worker roles.  </p>
  
  <p>I would like the ability to secure access to the hubs somehow.</p>
  
  <p>Is there anyway I can check to see what connection type the connecting user/worker role is using and accept/deny based on this?</p>
  
  <p>Another method I thought of was perhaps using certificate authentication on the internal hubs but i'd rather not have to for speed etc.   </p>
  
  <pre><code>GlobalHost.DependencyResolver.UseServiceBus(connectionString, "web");
  
  // Web external connection
  app.MapSignalR("/signalr", new HubConfiguration() 
       { EnableJavaScriptProxies = true, EnableDetailedErrors = false });
  
  // Worker internal connection
  app.MapSignalR("/signalr-internal", new HubConfiguration() 
       { EnableJavaScriptProxies = false, EnableDetailedErrors = true});    
  </code></pre>
  
  <p>EDIT: I've included my own answer</p>