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

@ -0,0 +1,14 @@
"""passbook multi-factor authentication engine"""
from logging import getLogger
from passbook.core.auth.factor import AuthenticationFactor
LOGGER = getLogger(__name__)
class DummyFactor(AuthenticationFactor):
"""Dummy factor for testing with multiple factors"""
def post(self, request):
"""Just redirect to next factor"""
return self.authenticator.user_ok()