Question

For example, I log in to my server. I want to store things like a username. Would the best way of going about it be:

self.set_secure_cookie('username', "foobar70")
Était-ce utile?

La solution

Just my oppinion. Secure cookies usually does good job to store data secure and works OK, if you need to store small data chunks, but passing lots of data back and forward with bigger cookies is annoying :) So the answer depends of your data volumes.

I usually use this implementation of sessions in Tornado, based on redis https://gist.github.com/1735032

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top