October 2018
Intermediate to advanced
332 pages
8h 9m
English
Sessions are the way Flask will store information across requests; to do this, Flask will use signed cookies using the previously set SECRET_KEY config to apply the HMAC-SHA1 default cryptographic method. So, a user can read their session cookie but can't modify it. Flask also sets a default session lifetime that defaults to 31 days to prevent relay attacks; this can be changed by using the configuration key's PERMANENT_SESSION_LIFETIME config key.
A Flask session object is a special kind of Python dictionary, but you can use it much like a plain ...