pgadmin4/web/pgadmin/authenticate/registry.py
Aditya Toshniwal cb635f6706 Removing dynamic module loading and replacing it with static loading. Fixes #7492
Gets rid of all occurrences and usage of get_own_javascripts since it is no longer used.
2022-06-30 11:06:50 +05:30

46 lines
1.1 KiB
Python

##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2022, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
"""External Authentication Registry."""
from pgadmin.utils.dynamic_registry import create_registry_metaclass
@classmethod
def load_modules(cls, app=None):
submodules = []
from . import internal as module
submodules.append(module)
from . import kerberos as module
submodules.append(module)
from . import ldap as module
submodules.append(module)
from . import mfa as module
submodules.append(module)
from . import oauth2 as module
submodules.append(module)
from . import webserver as module
submodules.append(module)
for module in submodules:
if "init_app" in module.__dict__.keys():
module.__dict__["init_app"](app)
AuthSourceRegistry = create_registry_metaclass(
"AuthSourceRegistry", __package__, load_modules=load_modules,
decorate_as_module=True
)