core: fix mfa, split up into multiple files, move factors to settings

This commit is contained in:
Jens Langhammer
2018-12-14 09:49:34 +01:00
parent 83ed1d857b
commit 52d1920914
5 changed files with 114 additions and 78 deletions

View File

@ -36,6 +36,7 @@ INTERNAL_IPS = ['127.0.0.1']
ALLOWED_HOSTS = []
LOGIN_URL = 'passbook_core:auth-login'
# CSRF_FAILURE_VIEW = 'passbook.core.views.errors.CSRFErrorView.as_view'
# Custom user model
AUTH_USER_MODEL = 'passbook_core.User'
@ -48,6 +49,10 @@ AUTHENTICATION_BACKENDS = [
'django.contrib.auth.backends.ModelBackend',
'passbook.oauth_client.backends.AuthorizedServiceBackend'
]
AUTHENTICATION_FACTORS = [
'passbook.core.auth.backend_factor.AuthenticationBackendFactor',
'passbook.core.auth.dummy.DummyFactor',
]
# Application definition