Metadata-Version: 2.0
Name: wagtail-2fa
Version: 0.0.3
Summary: Two factor authentication for Wagtail
Home-page: https://github.com/LabD/wagtail-2fa
Author: Lab Digital
Author-email: opensource@labdigital.nl
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 1.11
Classifier: Framework :: Django :: 2.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.6
Provides-Extra: docs
Provides-Extra: test
Requires-Dist: Django (>=1.11)
Requires-Dist: django-otp (>=0.4.3)
Requires-Dist: six (>=1.1)
Requires-Dist: qrcode (>=5.3)
Provides-Extra: docs
Requires-Dist: sphinx (>=1.4.0); extra == 'docs'
Provides-Extra: test
Requires-Dist: coverage (==.4.2); extra == 'test'
Requires-Dist: pytest (==3.0.5); extra == 'test'
Requires-Dist: pytest-django (==3.1.2); extra == 'test'
Requires-Dist: isort (==4.2.5); extra == 'test'
Requires-Dist: flake8 (==3.0.3); extra == 'test'
Requires-Dist: flake8-blind-except (==0.1.1); extra == 'test'
Requires-Dist: flake8-debugger (==1.4.0); extra == 'test'



===========
wagtail-2fa
===========

This Django app add's two factor authentication to Wagtail. Behind the scenes
it use django-otp_ which supports Time-based One-Time Passwords (TOTP). This
allows you to use various apps like Authy, Google Authenticator, or
1Password.


.. _django-otp: https://django-otp-official.readthedocs.io


Installation
============

.. code-block:: shell

   pip install wagtail-2fa


Then add the following lines before the wagtail apps in to the
``INSTALLED_APPS`` list in your Django settings:

.. code-block:: python

    INSTALLED_APPS = [
        'wagtail_2fa',
        'django_otp',
        'django_otp.plugins.otp_totp',

        # other apps
    ]


Next add the required middleware to the ``MIDDLEWARE``. It should come
after the AuthenticationMiddleware:

.. code-block:: python

    MIDDLEWARE = [
        # .. other middleware
        # 'django.contrib.auth.middleware.AuthenticationMiddleware',

        'wagtail_2fa.middleware.VerifyUserMiddleware',

        # 'wagtail.core.middleware.SiteMiddleware',
        # .. other middleware
    ]


Settings
========

The following settings are available (Set via your Django settings):

    - ``WAGTAIL_2FA_REQUIRED`` (default ``False``): When set to True all
      staff, superuser and other users with access to the Wagtail Admin site
      are forced to login using two factor authentication.




