How to use IUserIdProvider
<p>My code:</p>

<pre><code>public string GetUserId(IRequest request) {
   var token = request.QueryString.Get("token");
   // what is it? request.User.Identity.Name;
   if (string.IsNullOrWhiteSpace(token)) {
     return token;
   }
   else {
      return JsonConvert.SerializeObject(new UserAbility().GetUserByToken(token));
   }
}
</code></pre>

<p>I need to map the connection with the user using a different identifier. 
So i want to get the custom token from the QueryString in this method, but <code>GetUserId</code> doesn't trigger in every reqeust.</p>

<p>And i always get the <code>request.User.Identity.Name</code> is string empty?</p>