Skip to main content

Pythonic WebAuthn

Project description

py_webauthn

PyPI GitHub license Pythonic WebAuthn

A Python3 implementation of the WebAuthn API focused on making it easy to leverage the power of WebAuthn.

This library supports all FIDO2-compliant authenticators, including security keys, Touch ID, Face ID, Windows Hello, Android biometrics...and pretty much everything else.

Installation

This module is available on PyPI:

pip install webauthn

Requirements

  • Python 3.8 and up

Usage

The library exposes just a few core methods on the root webauthn module:

  • generate_registration_options()
  • verify_registration_response()
  • generate_authentication_options()
  • verify_authentication_response()

Two additional helper methods are also exposed:

  • options_to_json()
  • base64url_to_bytes()

Registration

See examples/registration.py for practical examples of using generate_registration_options() and verify_registration_response().

You can also run these examples with the following:

# See "Development" below for venv setup instructions
venv $> python -m examples.registration

Authentication

See examples/authentication.py for practical examples of using generate_authentication_options() and verify_authentication_response().

You can also run these examples with the following:

# See "Development" below for venv setup instructions
venv $> python -m examples.authentication

Development

Installation

Set up a virtual environment, and then install the project's requirements:

$> python3 -m venv venv
$> source venv/bin/activate
venv $> pip install -r requirements.txt

Testing

Python's unittest module can be used to execute everything in the tests/ directory:

venv $> python -m unittest

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

webauthn-1.0.0b2.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

webauthn-1.0.0b2-py3-none-any.whl (56.4 kB view details)

Uploaded Python 3

File details

Details for the file webauthn-1.0.0b2.tar.gz.

File metadata

  • Download URL: webauthn-1.0.0b2.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for webauthn-1.0.0b2.tar.gz
Algorithm Hash digest
SHA256 abc0ce223c92b83f112669465c0e521de60a1af68b1380a40ca5da2fa7b278c8
MD5 0c13c8872e8f1d5c86bbf06036e14c3e
BLAKE2b-256 927ba70cca2e99d2eeca2170a2ebac3315afadfa5c378dcac98236a382a18e47

See more details on using hashes here.

File details

Details for the file webauthn-1.0.0b2-py3-none-any.whl.

File metadata

  • Download URL: webauthn-1.0.0b2-py3-none-any.whl
  • Upload date:
  • Size: 56.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for webauthn-1.0.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 e33e6c430a906b1875dc8d40f032a2f3538125ff3949596e5ed17fde81110595
MD5 1038a6165fbcc6421737fdd1672dad4c
BLAKE2b-256 130e132a1d7bea10764de483436c135cae7f5dd0bde9a56e9ced3f1c22d3ec56

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