# Yubico Python Client
Python class for verifying Yubico One Time Passwords (OTPs) based on the validation protocol version 2.0.
Yubico website: [http://www.yubico.com][1]
Yubico documentation: [http://www.yubico.com/developers/intro/][2]
Validation Protocol Version 2.0 FAQ: [http://www.yubico.com/develop/open-source-software/web-api-clients/server/][3]
Validation Protocol Version 2.0 description: [https://github.com/Yubico/yubikey-val/wiki/ValidationProtocolV20][4]
## Installation
pip install yubico
## Build Status
[](http://travis-ci.org/Kami/python-yubico-client)
## Running Tests
python setup.py test
## Usage
Generate your client id and secret key (this can be done by visiting the [Yubico website](https://api.yubico.com/get-api-key/))
Use the client
Single mode:
from yubico.yubico import Yubico
yubico = Yubico(‘client id’, ‘secret key’) yubico.verify(‘otp’)
Multi mode:
from yubico.yubico import Yubico
yubico = Yubico(‘client id’, ‘secret key’) yubico.verify_multi([‘otp 1’, ‘otp 2’, ‘otp 3’])
The verify method will return True if the provided OTP is valid (STATUS=OK).
The verify_multi method will return True if all of the provided OTPs are valid (STATUS=OK).
Both methods can also throw one of the following exceptions:
StatusCodeError - server returned REPLAYED_OTP status code
SignatureVerificationError - server response message signature verification failed
InvalidClientIdError - client with the specified id does not exist (server returned NO_SUCH_CLIENT status code)
Exception - server returned one of the following status values: BAD_OTP, BAD_SIGNATURE, MISSING_PARAMETER, OPERATION_NOT_ALLOWED, BACKEND_ERROR, NOT_ENOUGH_ANSWERS, REPLAYED_REQUEST or no response was received from any of the servers in the specified time frame (default timeout = 10 seconds)
[1]: http://www.yubico.com [2]: http://www.yubico.com/developers/intro/ [3]: http://www.yubico.com/develop/open-source-software/web-api-clients/server/ [4]: https://github.com/Yubico/yubikey-val/wiki/ValidationProtocolV20
Metadata
Release files for yubico 1.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yubico-1.6.2.tar.gz | 14.7 kB | Without provenance | Details for yubico-1.6.2.tar.gz |
Release files / yubico-1.6.2.tar.gz
| Download URL | yubico-1.6.2.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4274650d26aa821f435df3b7c0cfc3a043240f9304dfda0def0a8ce91c83f380
|
|
BLAKE2b-256 checksum How to use checksums |
431e34093ca0f3d956cfb26cc59d42de9dab14547ec497d43fb7cf2669ca1034
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for yubico 1.6.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.