Skip to content
Snippets Groups Projects
Verified Commit 37665310 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Make Yubikey optional.

parent 02bf849e
No related branches found
No related tags found
1 merge request!59Resolve "2FA"
......@@ -70,7 +70,6 @@ INSTALLED_APPS = [
'django_otp',
'django_otp.plugins.otp_static',
'django_otp.plugins.otp_totp',
'otp_yubikey',
'two_factor',
'impersonate',
]
......@@ -324,6 +323,9 @@ CRON_CLASSES = [
ANONYMIZE_ENABLED = _settings.get('maintenance.anonymisable', True)
if _settings.get('2fa.yubikey.enabled', False):
INSTALLED_APPS.insert(INSTALLED_APPS.index('two_factor')+1, 'otp_yubikey')
if _settings.get('2fa.twilio.sid', None):
MIDDLEWARE.insert(MIDDLEWARE.index('django_otp.middleware.OTPMiddleware')+1, 'two_factor.middleware.threadlocals.ThreadLocals')
TWILIO_SID = _settings.get('2fa.twilio.sid')
......
......@@ -53,12 +53,13 @@ requests = "^2.22"
django-otp = "^0.7.4"
django-formtools = "^2.1"
django-two-factor-auth = "^1.9"
django-otp-yubikey = '^0.5.2'
django-otp-yubikey = { version = '^0.5.2', optional = true }
twilio = { version = "^6.33", optional = true }
[tool.poetry.extras]
ldap = ["django-auth-ldap"]
twilio = ["twilio"]
yubikey = ["django-otp-yubikey"]
[tool.poetry.dev-dependencies]
sphinx = "^2.1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment