Move Factor instances to database

This commit is contained in:
Jens Langhammer
2019-02-16 09:52:37 +01:00
parent 57e5996513
commit 59a15c988f
19 changed files with 281 additions and 34 deletions

View File

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