Skip to content
This repository has been archived by the owner on Sep 5, 2021. It is now read-only.

yackermann/flask-fido-u2f

Repository files navigation

DEPRECATED flask-fido-u2f DEPRECATED

DEPRECATED DEPRECATED DEPRECATED DEPRECATED DEPRECATED

PLEASE TAKE A LOOK AT WEBAUTHN API

MORE RESOURCES WEBAUTHN-AWESOME

Flask plugin to simplify usage and management of U2F devices.

Installation

pip install flask-fido-u2f

Usage

from flask_fido_u2f import U2F

app = Flask(__name__)
app.config['U2F_APPID']  = 'https://example.com'
app.config['SECRET_KEY'] = 'SomeVeryRandomKeySetYouMust'

u2f = U2F(app)

@u2f.read
def read():
    # Returns users U2F devices object
    pass

@u2f.save
def save(u2fdata):
    # Saves users U2F devices object
    pass

@u2f.enroll_on_success
def enroll_on_success():
    # Executes on successful U2F enroll
    pass

@u2f.enroll_on_fail
def enroll_on_fail(e):
    # Executes on U2F enroll fail
    # Takes argument e - exception raised
    pass

@u2f.sign_on_success
def sign_on_success():
    # Executes on successful U2F authentication
    pass

@u2f.sign_on_fail
def sign_on_fail(e):
    # Executes on U2F sign fail
    # Takes argument e - exception raised
    pass

Development

Install dev-dependencies

pip install -r dev-requirements.txt

Run tests

python -m unittest discover

Docs

License

MIT © Yuriy Ackermann

About

DEPRECATED FIDO U2F plugin for Flask. Check Webauthn API and Awesome-Webauthn https://github.com/herrjemand/awesome-webauthn

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages