2020-04-13 18:03:01 +00:00
|
|
|
import importlib
|
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
2020-04-15 20:19:03 +00:00
|
|
|
providers = {}
|
2020-04-13 18:03:01 +00:00
|
|
|
|
|
|
|
for module in settings.EXPEPHALON_MODULES:
|
|
|
|
try:
|
|
|
|
moo = importlib.import_module(f"{module}.otp")
|
2020-04-15 20:19:03 +00:00
|
|
|
for name, provider in moo.OTPPROVIDERS.items():
|
|
|
|
providers[name] = provider
|
2020-04-13 18:03:01 +00:00
|
|
|
except (AttributeError, ModuleNotFoundError):
|
|
|
|
continue
|