You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Felipe Martin Garcia 84dd2fb30f
Merge pull request #1 from fmartingr/dependabot/pip/urllib3-1.24.2
4 months ago
.gitignore Cleaned some code/gitignore and commented the classes 8 years ago
MANIFEST.in Added initial objects 8 years ago
Pipfile Updated requirements, using pipenv 3 years ago
Pipfile.lock Bump urllib3 from 1.24.1 to 1.24.2 2 years ago
README.md Prettified README file 5 years ago
setup.py Updated requirements, using pipenv 3 years ago
yubikey.py Cleaned some code/gitignore and commented the classes 8 years ago

README.md

python-yubikey

A simple wrapper to use your yubikey with the yubico API.

Install the lib

pip install python-yubikey

Register for an API key

from yubikey import Yubikey

yubi = Yubikey()
yubi.register('<EMAIL>', '<INSERT OTP HERE>')
# yubi.id and yubi.key are now set

Check valid OTP

yubi = Yubikey('<ID>', '<Key>')
result = yubi.verify('<INSERT ANOHTER OTP HERE>')
# True / False
# If <key> is provided, requests will be signed and the responses checked.

Optionals

# Using custom API server
# Must be one of YubicoWS._servers
yubi = Yubikey(123, 'dGhpc3JlcG9yb2Nrcw==', server='api2.yubico.com')

# Using http instead of https
yubi = Yubikey(123, 'dGhpc3JlcG9yb2Nrcw==', protocol='http')

NO WARRANTY

THE PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY. IT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW THE AUTHOR WILL BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.