title: Web API 2 custom authentication
body: <p>I'm trying to come up with an authentication approach that is custom. That is, user information is in the table and I'm doing the username and password verification myself, in the API.</p>
  
  <p>For this solution, I'm trying not to use ASP.NET Identity.</p>
  
  <p>On a previous project, I did something like this where I would verify the password provided, when successful, return a session GUID in the response cookies which would then make the client send this session GUID with all subsequent requests to the API.</p>
  
  <p>Through an action filter, I would then use the GUID (and the IP of the client making the request) to look up in a table to see if the session is still active and matching the IP that created the session in the first place.</p>
  
  <p>What I would like this time is avoid having to look up in the database at each request I'm getting on the API.</p>
  
  <p>Is there any way to register the GUID tokens and other information, in memory on the server ?</p>
  
  <p>What kind of authentication should I look into ?</p>