Duo Web SDK for two-factor authentication
Project description
Duo Universal Python SDK
This SDK allows a web developer to quickly add Duo's interactive, self-service, two-factor authentication to any Python web login form. Both Python 2 and Python 3 are supported.
What's here:
duo_universal
- The Python Duo SDK for interacting with the Duo Universal Promptdemo
- An example web application with Duo integratedtests
- Test cases
Getting Started
To use the SDK in your existing development environment, install it from pypi (https://pypi.org/project/duo_universal).
pip install duo_universal
Once it's installed, see our developer documentation at https://duo.com/docs/duoweb and demo/app.py
in this repo for guidance on integrating Duo 2FA into your web application.
Contribute
To contribute, fork this repo and make a pull request with your changes when they're ready.
If you're not already working from a dedicated development environment, it's recommended a virtual environment is used. Assuming a virtual environment named env
, create and activate the environment:
# Python 3
python -m venv env
source env/bin/activate
# Python 2
virtualenv env
source env/bin/activate
Build and install the SDK from source:
pip install -r requirements.txt
pip install .
Tests
Install the test requirements:
cd tests
pip install -r requirements.txt
Then run tests from the test
directory:
# Run an individual test file
python <test_name>.py
# Run all tests with nose
nose2
# Run all tests with unittest
python -m unittest
Lint
flake8
Support
Please report any bugs, feature requests, or issues to us directly at support@duosecurity.com.
Thank you for using Duo!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for duo_universal-1.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04b95cebdc31230b3ca24f53391f72ba5c92a501beb1c228f6c7075bce0a353f |
|
MD5 | 41bee64802ff8467d425ac1bd215b68a |
|
BLAKE2b-256 | bb4e555245a409c74d94320b4eaa029abfd99f4718fa6e82f91918da46713170 |