OAuth Provider Rewrite (#182)
This commit is contained in:
@ -87,9 +87,8 @@ INSTALLED_APPS = [
|
||||
"passbook.policies.password.apps.PassbookPoliciesPasswordConfig",
|
||||
"passbook.policies.group_membership.apps.PassbookPoliciesGroupMembershipConfig",
|
||||
"passbook.policies.reputation.apps.PassbookPolicyReputationConfig",
|
||||
"passbook.providers.app_gw.apps.PassbookApplicationApplicationGatewayConfig",
|
||||
"passbook.providers.oauth.apps.PassbookProviderOAuthConfig",
|
||||
"passbook.providers.oidc.apps.PassbookProviderOIDCConfig",
|
||||
"passbook.providers.proxy.apps.PassbookProviderProxyConfig",
|
||||
"passbook.providers.oauth2.apps.PassbookProviderOAuth2Config",
|
||||
"passbook.providers.saml.apps.PassbookProviderSAMLConfig",
|
||||
"passbook.recovery.apps.PassbookRecoveryConfig",
|
||||
"passbook.sources.ldap.apps.PassbookSourceLDAPConfig",
|
||||
@ -371,9 +370,6 @@ _LOGGING_HANDLER_MAP = {
|
||||
"celery": "WARNING",
|
||||
"selenium": "WARNING",
|
||||
"grpc": LOG_LEVEL,
|
||||
"oauthlib": LOG_LEVEL,
|
||||
"oauth2_provider": LOG_LEVEL,
|
||||
"oidc_provider": LOG_LEVEL,
|
||||
"docker": "WARNING",
|
||||
"urllib3": "WARNING",
|
||||
"elasticapm": "WARNING",
|
||||
|
||||
@ -26,23 +26,29 @@ handler500 = error.ServerErrorView.as_view()
|
||||
urlpatterns = []
|
||||
|
||||
for _passbook_app in get_apps():
|
||||
mountpoints = None
|
||||
base_url_module = _passbook_app.name + ".urls"
|
||||
if hasattr(_passbook_app, "mountpoint"):
|
||||
mountpoint = getattr(_passbook_app, "mountpoint")
|
||||
mountpoints = {base_url_module: mountpoint}
|
||||
if hasattr(_passbook_app, "mountpoints"):
|
||||
mountpoints = getattr(_passbook_app, "mountpoints")
|
||||
if not mountpoints:
|
||||
continue
|
||||
for module, mountpoint in mountpoints.items():
|
||||
namespace = _passbook_app.label + module.replace(base_url_module, "")
|
||||
_path = path(
|
||||
_passbook_app.mountpoint,
|
||||
include(
|
||||
(_passbook_app.name + ".urls", _passbook_app.label),
|
||||
namespace=_passbook_app.label,
|
||||
),
|
||||
mountpoint, include((module, _passbook_app.label), namespace=namespace,),
|
||||
)
|
||||
urlpatterns.append(_path)
|
||||
LOGGER.debug(
|
||||
"Mounted URLs",
|
||||
app_name=_passbook_app.name,
|
||||
mountpoint=_passbook_app.mountpoint,
|
||||
mountpoint=mountpoint,
|
||||
namespace=namespace,
|
||||
)
|
||||
|
||||
urlpatterns += [
|
||||
# Administration
|
||||
path("administration/django/", admin.site.urls),
|
||||
path("metrics/", MetricsView.as_view(), name="metrics"),
|
||||
]
|
||||
|
||||
@ -22,8 +22,8 @@ defuse_stdlib()
|
||||
class WSGILogger:
|
||||
""" This is the generalized WSGI middleware for any style request logging. """
|
||||
|
||||
def __init__(self, application):
|
||||
self.application = application
|
||||
def __init__(self, _application):
|
||||
self.application = _application
|
||||
self.logger = get_logger("passbook.wsgi")
|
||||
|
||||
def __healthcheck(self, start_response):
|
||||
|
||||
Reference in New Issue
Block a user