title: Check authorize in SignalR attribute
body: <p>i have some services on ServiceStack and use SignalR in this project. </p>
  
  <p>And now, i would like to secure hub connection (access only for authenticated users), but i use ServiceStack framework authentication.. (not asp.net authentication) and ServiceStack's sessions (write AuthUserId ih this session and authentication flag).</p>
  
  <p>So, when user trying connect to the hub -- hub must to check authentication... </p>
  
  <p>(yes, i can request Cookies from Hub (method OnConnected, for example), but SignalR check authentication in Authorize Attribute - and i must do it in this class (not in hub)</p>
  
  <p>(<a href="http://www.asp.net/signalr/overview/signalr-20/security/hub-authorization" rel="noreferrer">http://www.asp.net/signalr/overview/signalr-20/security/hub-authorization</a>)</p>
  
  <p>So, i create class </p>
  
  <pre><code>[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
  public class AuthorizeMyAttribute : AuthorizeAttribute
  {
     protected override bool UserAuthorized(System.Security.Principal.IPrincipal user)
     {
       //... how can i request Cookies? / or may be can access for ServiceStack session...
       //    and return true or false
     }
  }
  </code></pre>
  
  <p>What can i do for it?
  Thanks!</p>