Skip to main content

A django-otp plugin that verifies YubiKey OTP tokens.

Project description

PyPI Documentation Source

This is a django-otp plugin that handles YubiKey devices using the Yubico OTP algorithm. This includes two device definitions: one to verify YubiKey tokens locally and another to verify them against a web service.

See django-otp for more information on the OTP framework.

Development

This project is built and managed with hatch. If you don’t have hatch, I recommend installing it with pipx: pipx install hatch.

pyproject.toml defines several useful scripts for development and testing. The default environment includes all dev and test dependencies for quickly running tests. The test environment defines the test matrix for running the full validation suite. Everything is executed in the context of the Django project in test/test_project.

As a quick primer, hatch scripts can be run with hatch run [<env>:]<script>. To run linters and tests in the default environment, just run hatch run check. This should run tests with your default Python version and the latest Django. Other scripts include:

  • manage: Run a management command via the test project. This can be used to generate migrations.

  • lint: Run all linters.

  • fix: Run all fixers to address linting issues. This may not fix every issue reported by lint.

  • test: Run all tests.

  • check: Run linters and tests.

  • warn: Run tests with all warnings enabled. This is especially useful for seeing deprecation warnings in new versions of Django.

  • cov: Run tests and print a code coverage report.

To run the full test matrix, run hatch run test:run. You will need multiple specific Python versions installed for this.

You can clean up the hatch environments with hatch env prune, for example to force dependency updates.

Project details


Download files

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

Source Distribution

django_otp_yubikey-1.1.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

django_otp_yubikey-1.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file django_otp_yubikey-1.1.0.tar.gz.

File metadata

  • Download URL: django_otp_yubikey-1.1.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.0

File hashes

Hashes for django_otp_yubikey-1.1.0.tar.gz
Algorithm Hash digest
SHA256 34dfe46baf120b8d2fd9510b4097b150907f761eea51c6604e4c8a694f954830
MD5 59b6b8835d64d24950362941fdf1d9c8
BLAKE2b-256 0fa2fbeadde31b09121c843c28e84d23fff670c4bc04e7a90c042f29bb91abe9

See more details on using hashes here.

File details

Details for the file django_otp_yubikey-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_otp_yubikey-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b010051446186273a52f8d25d3866ea1d2df8bc841e50d60e79919da08c539d7
MD5 b5ab8d598c620ebe573a8d033a12aa4b
BLAKE2b-256 489a196ebc212c136661408496bfe32c7b41de735eae974354ea88758e3a012c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page