|
|
|
|
|
by jessaustin
4730 days ago
|
|
I don't see why you have to store the hash of the token. You know the key you used for HMACing, why can't you just check that the cookie contains a valid hash of the rest of its data (which is as extensive as you need: session id, expiry, IP, whatever)? To prevent the use of old sessions just make the session id a counter. A single session counter per user is probably less hassle (and more useful) to store than the whole hash. |
|
Doing all that to store a 32-bit integer is somehow less hassle than hashing and storing a 128-bit string?