For a RESTful web service we say that that the server shouldn\'t store any state. Now for every request the \'user\' must be authenticated and must have an authorization for
The spirit of REST is statelessness. This does not mean that client state cannot be persisted by a service, but in practice it does mean that client state held in memory by a server is generally a bad thing.
Instead of keeping authentication data in memory, or going to the DB for verification every time, what you can do is keep a function in memory (i.e., code) that is used to crypt/decrypt user information. This is a technique that is also suggested by:
What should I store in cookies to implement "Remember me" during user login
So, for example, what you would do is the following:
Keep in mind that this "function" I describe is not a novel thing - it's a standard secure hash, but one that is based off a unique private key that only your collective servers know about. And you can rotate such a key, etc. as needed.