bc9e7e8b93
* build(deps): bump structlog from 20.1.0 to 20.2.0 Bumps [structlog](https://github.com/hynek/structlog) from 20.1.0 to 20.2.0. - [Release notes](https://github.com/hynek/structlog/releases) - [Changelog](https://github.com/hynek/structlog/blob/master/CHANGELOG.rst) - [Commits](https://github.com/hynek/structlog/compare/20.1.0...20.2.0) Signed-off-by: dependabot[bot] <support@github.com> * *: use structlog.stdlib instead of structlog for type-hints Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer <jens.langhammer@beryju.org>
27 lines
795 B
Python
27 lines
795 B
Python
"""authentik oauth_client config"""
|
|
from importlib import import_module
|
|
|
|
from django.apps import AppConfig
|
|
from django.conf import settings
|
|
from structlog.stdlib import get_logger
|
|
|
|
LOGGER = get_logger()
|
|
|
|
|
|
class AuthentikSourceOAuthConfig(AppConfig):
|
|
"""authentik source.oauth config"""
|
|
|
|
name = "authentik.sources.oauth"
|
|
label = "authentik_sources_oauth"
|
|
verbose_name = "authentik Sources.OAuth"
|
|
mountpoint = "source/oauth/"
|
|
|
|
def ready(self):
|
|
"""Load source_types from config file"""
|
|
for source_type in settings.AUTHENTIK_SOURCES_OAUTH_TYPES:
|
|
try:
|
|
import_module(source_type)
|
|
LOGGER.debug("Loaded OAuth Source Type", type=source_type)
|
|
except ImportError as exc:
|
|
LOGGER.debug(str(exc))
|