-
Notifications
You must be signed in to change notification settings - Fork 33
/
README
67 lines (48 loc) · 1.95 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
== python-yubico
Python package for managing Yubico OTP slots on YubiKeys.
NOTE: This project is no longer maintained. Please refer to https://github.com/Yubico/yubikey-manager for a more fully-featured and supported Python library for interacting with YubiKeys.
=== Introduction
The YubiKey is a hardware token for authentication. The main mode of the
YubiKey is entering a one time password (or a strong static password) by acting
as a USB HID device, but there are things one can do with bi-directional
communication:
1. Configuration. The yubikey_config class should be a feature-wise complete
implementation of everything that can be configured on YubiKeys version 1.3
to 3.x (besides deprecated functions in YubiKey 1.x).
See `examples/configure_nist_test_key` for an example.
2. Challenge-response. YubiKey 2.2 and later supports HMAC-SHA1 or Yubico
challenge-response operations.
See `examples/nist_challenge_response` for an example.
This library makes it easy to use these two features.
=== Example
Here is a trivial usage example :
[source, python]
----
#!/usr/bin/env python
""" Get version of connected YubiKey. """
import sys
import yubico
try:
yubikey = yubico.find_yubikey(debug=False)
print("Version: {}".format(yubikey.version()))
except yubico.yubico_exception.YubicoError as e:
print("ERROR: {}".format(e.reason))
sys.exit(1)
----
=== Installation
==== Using the Ubuntu/Debian package manager
If you use a recent Ubuntu release, you should be able to install python-yubico
using apt-get:
$ sudo apt-get install python3-yubico
==== Using Pip
python-yubico is installable via pip:
$ pip install python-yubico
==== Using Setup
Or, directly from the source package in the standard Python way:
$ cd python-yubico-$ver
$ python setup.py install
This requires the `python-setuptools` package.
=== License
Copyright (c) Yubico AB.
Licensed under the BSD 2-clause license.
See the file COPYING for full licence statement.