Generate TTL based self expiring crumbs (token).
Usage
` pip install --upgrade crumb.py `
` >>> from crumb import Crumb >>> >>> # generate crumb for user that expires in 30 seconds >>> c = Crumb('tim@tom.com', 30, secret='!@#$') >>> c.generate() 830b60fe77b2 >>> >>> # key attribute also contains the generated crumb >>> print c.key 830b60fe77b2 >>> >>> # verify the generated crumb >>> c = Crumb('tim@tom.com', 30, secret='!@#$', key='830b60fe77b2') >>> c.validate() True >>> >>> # try to verify again after 60 sec >>> c.validate() False `
Metadata
Release files for crumb.py 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crumb.py-0.5.tar.gz | 3.4 kB | Details |
Release files / crumb.py-0.5.tar.gz
| Download URL | crumb.py-0.5.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e425670765ab01f3ba95bf554d0c0e745c7423622e07c47a8e3a85cf5dfa892
|
|
BLAKE2b-256 checksum How to use checksums |
4f03f4120e6a273a634f96d64404463b396f9b156cb43a51afcd07e828d17360
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |