title: ASP.NET MVC4 Web API & Session variables
body: <p>In my asp.net mvc4 project, I am using ApiControllers to serve both web clients and mobile clients. To secure the web services, I am using the [Authorize] annotation. 
  So for now, the web client is working fine. However, when I tend to invoke some Web API from a mobile application (e.g. Android), I got an error.
  when I looked back at code snippet:</p>
  
  <pre><code>   [Authorize]
      public List&lt;double&gt; GetSomeInfo(int param1, string param2)
          {
             User user = SessionData.CurrentUser;
             // do something using user.UserId
             // ....
  
          }
  </code></pre>
  
  <p>Session Data does hold user connected properties only when he is connected to the Web App. But in the case of mobile clients, Session Data is null. So, is there any appropriate method to resolve this problem. 
  In my opinion, I think that userId should be provided as a parameter for any Web API that may need it to do achieve some treatment.
  What do you think ?</p>