Examples
Example keys and passwords are public test material.
The timestamp changes on each run. Recover the payload shown here; use this public key only for experiments.
Keep a dark theme and French locale
Input
{"theme":"dark","locale":"fr-FR"}Expected checks
Flask Session Decode recovers:
{"theme":"dark","locale":"fr-FR"}- Key
{"option":"UTF8","string":"public-demo-secret"}- Salt
{"option":"UTF8","string":"cookie-session"}- Algorithm
sha1
Preserve a shopping cart with two quantities
Input
{"cart":[{"sku":"BOOK-01","qty":2},{"sku":"MAP-02","qty":1}]}Expected checks
Flask Session Decode recovers:
{"cart":[{"sku":"BOOK-01","qty":2},{"sku":"MAP-02","qty":1}]}- Key
{"option":"UTF8","string":"public-demo-secret"}- Salt
{"option":"UTF8","string":"cookie-session"}- Algorithm
sha256
Keep false distinct from a missing permission
Input
{"roles":["reader"],"can_publish":false}Expected checks
Flask Session Decode recovers:
{"roles":["reader"],"can_publish":false}- Key
{"option":"UTF8","string":"public-demo-secret"}- Salt
{"option":"UTF8","string":"cookie-session"}- Algorithm
sha256
Retain a zero-prefixed customer identifier
Input
{"customer_id":"000042","return_to":"/orders?state=open"}Expected checks
Flask Session Decode recovers:
{"customer_id":"000042","return_to":"/orders?state=open"}- Key
{"option":"UTF8","string":"public-demo-secret"}- Salt
{"option":"UTF8","string":"cookie-session"}- Algorithm
sha1
Sign a nested feature setting with a custom salt
Input
{"features":{"compact":true,"preview":null}}Expected checks
Flask Session Decode recovers:
{"features":{"compact":true,"preview":null}}- Key
{"option":"UTF8","string":"public-demo-secret"}- Salt
{"option":"UTF8","string":"demo-preferences"}- Algorithm
sha256