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.
For this solution, I'm trying not to use ASP.NET Identity.
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.
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.
What I would like this time is avoid having to look up in the database at each request I'm getting on the API.
Is there any way to register the GUID tokens and other information, in memory on the server ?
What kind of authentication should I look into ?