PerlDancer/Dancer2 — pull request #127 by dagolden (2012-12-06 21:05:19+00:00)
Title: Move session ID creation into SessionFactory

Rationale: a session requires an ID, but otherwise should be
agnostic about the implementation details. A SessionFactory
implementation might have special requirements for a session ID.

This commit moves the random ID generation into SessionFactory
as a default ID, but in a way that allows overriding by a
consuming class.

The session object memory address is removed from the input
to the hash function (as the ID is generated before the object
exists), but this is a very small loss of entropy.

If more entropy were desired, the length of the shuffled random
string could be increased to compensate.