VOOZH about

URL: https://pypi.org/project/fido2/

โ‡ฑ fido2 ยท PyPI


Skip to main content

fido2 2.2.0

pip install fido2

Latest release

Released:

FIDO2/WebAuthn library for implementing clients and servers.

Navigation

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for dain from gravatar.com
dain

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: Apache Software License, BSD License, Mozilla Public License 2.0 (MPL 2.0) (Copyright (c) 2018 Yubico AB All rights reserved. Redistribution and use in source and binary forms...)
  • Author: Dain Nilsson
  • Tags fido2 , webauthn , ctap , u2f
  • Requires: Python <4, >=3.10
  • Provides-Extra: pcsc

Project description

== python-fido2
image:https://github.com/Yubico/python-fido2/workflows/build/badge.svg["Github actions build", link="https://github.com/Yubico/python-fido2/actions"]

Provides library functionality for communicating with a FIDO device over USB as
well as verifying attestation and assertion signatures.

NOTE: Version 2.0 is now released. For help with migration from version 1.x, see
link:doc/Migration_1-2.adoc[the migration guide].

This library aims to support the FIDO U2F and FIDO 2 protocols for
communicating with a USB authenticator via the Client-to-Authenticator Protocol
(CTAP 1 and 2). In addition to this low-level device access, classes defined in
the `fido2.client` and `fido2.server` modules implement higher level operations
which are useful when interfacing with an Authenticator, or when implementing
WebAuthn support for a Relying Party.

For usage, see the `examples/` directory and
link:https://developers.yubico.com/python-fido2/API_Documentation/[API documentation].


=== References
These links related to WebAuthn and FIDO2 can help you get started:

* Yubico WebAuthn/FIDO2 guide: https://developers.yubico.com/FIDO2/
* W3C WebAuthn specification: https://www.w3.org/TR/webauthn/
* FIDO specifications: https://fidoalliance.org/specifications/download/


=== License
This project, with the exception of the files mentioned below, is licensed
under the BSD 2-clause license.
See the _COPYING_ file for the full license text.

This project contains source code from pyu2f (https://github.com/google/pyu2f)
which is licensed under the Apache License, version 2.0.
These files are located in `fido2/hid/`.
See http://www.apache.org/licenses/LICENSE-2.0,
or the _COPYING.APLv2_ file for the full license text.

This project also bundles the public suffix list (https://publicsuffix.org)
which is licensed under the Mozilla Public License, version 2.0.
This file is stored as `fido2/public_suffix_list.dat`.
See https://mozilla.org/MPL/2.0/,
or the _COPYING.MPLv2_ file for the full license text.


=== Requirements
fido2 is compatible with Python 3.10 and later, and is tested on Windows, MacOS,
and Linux. Support for OpenBSD, FreeBSD, and NetBSD is provided as-is and
relies on community contributions.


=== Installation

fido2 is installable by running the following command:

pip install fido2

To install the dependencies required for communication with NFC authenticators,
instead use:

pip install fido2[pcsc]

Under Windows 10 (1903 or later) access to FIDO devices is restricted and
requires running as Administrator. This library can still be used when running
as non-administrator, via the `fido.client.WindowsClient` class. An example of
this is included in the file `examples/credential.py`.


Under Linux you will need to add a Udev rule to be able to access the FIDO
device, or run as root. For example, the Udev rule may contain the following:

----
#Udev rule for allowing HID access to Yubico devices for FIDO support.

KERNEL=="hidraw*", SUBSYSTEM=="hidraw", \
MODE="0664", GROUP="plugdev", ATTRS{idVendor}=="1050"
----

There may be a package already available for your distribution that does this
for you, see:
https://support.yubico.com/hc/en-us/articles/360013708900-Using-Your-U2F-YubiKey-with-Linux

Under FreeBSD you will either need to run as root or add rules for your device
to /etc/devd.conf, which can be automated by installing security/u2f-devd:

# pkg install u2f-devd

==== Dependencies
This project depends on Cryptography. For instructions on installing this
dependency, see https://cryptography.io/en/latest/installation/.

NFC support is optionally available via PC/SC, using the pyscard library. For
instructions on installing this dependency, see
https://github.com/LudovicRousseau/pyscard/blob/master/INSTALL.md.


=== Development
For development of the library we use https://docs.astral.sh/uv/[uv].
Follow the uv Getting Started guide to install and configure it.

We also use https://pre-commit.com/[pre-commit] to run some scans on the code
prior to committing.


==== Running tests
While some tests can run on their own, most require a connected FIDO2 device to run.

WARNING: These tests are destructive, and will factory reset the device under test.
As a safety precaution, the tests will only run on a device that is in a newly reset
state, as far as the test runner can tell.

uv run pytest


Project details

Verified details

These details have been verified by PyPI
Maintainers
๐Ÿ‘ Avatar for dain from gravatar.com
dain

Unverified details

These details have not been verified by PyPI
Project links
Meta
  • License: Apache Software License, BSD License, Mozilla Public License 2.0 (MPL 2.0) (Copyright (c) 2018 Yubico AB All rights reserved. Redistribution and use in source and binary forms...)
  • Author: Dain Nilsson
  • Tags fido2 , webauthn , ctap , u2f
  • Requires: Python <4, >=3.10
  • Provides-Extra: pcsc

Release history Release notifications | RSS feed

Download files

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

Source Distribution

fido2-2.2.0.tar.gz (294.2 kB view details)

Uploaded Source

Built Distribution

Filter files by name, interpreter, ABI, and platform.

If you're not sure about the file name format, learn more about wheel file names.

Copy a direct link to the current filters

fido2-2.2.0-py3-none-any.whl (234.0 kB view details)

Uploaded Python 3

File details

Details for the file fido2-2.2.0.tar.gz.

File metadata

  • Download URL: fido2-2.2.0.tar.gz
  • Upload date:
  • Size: 294.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fido2-2.2.0.tar.gz
Algorithm Hash digest
SHA256 0d8122e690096ad82afde42ac9d6433a4eeffda64084f36341ea02546b181dd1
MD5 69726a07d496447671301294ceaf394f
BLAKE2b-256 09344837e2f5640baf61d8abd6125ccb6cc60b4b2933088528356ad6e781496f

See more details on using hashes here.

File details

Details for the file fido2-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: fido2-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 234.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fido2-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3587ccf0af7b71b5dd73f17e1dbec9f0fd157292f9163f02e7778f46d0d25fe5
MD5 ee95cfb35bc21cc0b00bbbf9eb6b829a
BLAKE2b-256 0182f3c5dd87b0977f5547cc132b7969e6f5075a8c2f5881cf4b6df6378505f9

See more details on using hashes here.

Supported by

๐Ÿ‘ Image
AWS Cloud computing and Security Sponsor ๐Ÿ‘ Image
Datadog Monitoring ๐Ÿ‘ Image
Depot Continuous Integration ๐Ÿ‘ Image
Fastly CDN ๐Ÿ‘ Image
Google Download Analytics ๐Ÿ‘ Image
Pingdom Monitoring ๐Ÿ‘ Image
Sentry Error logging ๐Ÿ‘ Image
StatusPage Status page