Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Utilities to generate and verify tokens (autodeprecating or not).

Currently implemented :

  • Time-based One-time Password (TOTP)

TOTP Example

Below is an example of a token based on TOTP, self-deprecating after a given number of seconds

from roughrider.token.hmac_factories import TOTTokenFactory

factory = TOTTokenFactory(secret=b'secret', TTL=180)  # 3 min TTL
token = factory.generate('my word')
assert factory.challenge(token, 'my word') is True
assert factory.challenge(token, 'my other word') is False

CHANGES

0.1 (2021-10-09)

  • Initial release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

roughrider.token-0.1.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file roughrider.token-0.1.tar.gz.

File metadata

  • Download URL: roughrider.token-0.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.8

File hashes

Hashes for roughrider.token-0.1.tar.gz
Algorithm Hash digest
SHA256 99a7c4c4576ef56dbd23ab58adf8e34510a6a5e37a1c571e8798d4f393546e82
MD5 c1ff5862a18b32c4d47ac63a435881ec
BLAKE2b-256 b1ca6623f7fbea37957c86f7bed0fbf947f6da17f9f233425505cd3951e0a2db

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page