Skip to content

Commit

Permalink
Merge pull request #526 from Ilhasoft/feature/remove-rp-apps
Browse files Browse the repository at this point in the history
Remove any reference from weni-rp-apps
  • Loading branch information
lucaslinhares authored Feb 13, 2025
2 parents ee0c1af + fbaf557 commit 4644367
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions temba/settings.py.prod
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,9 @@ INSTALLED_APPS += (
"elasticapm.contrib.django",
# OIDC authentication
"mozilla_django_oidc",
"weni.auth",
"corsheaders",
)

if env("USE_INTERNAL_APP", default=True):
INSTALLED_APPS += (
"weni.internal",
"weni.ticketer_queues",
)

# SENTRY
# ------------------------------------------------------------------------------
sentry_sdk.init(dsn=env("SENTRY_DSN", default=""), integrations=[DjangoIntegration()])
Expand Down Expand Up @@ -340,11 +333,6 @@ RETENTION_PERIODS.update(
httplog=timedelta(days=env.int("RETENTION_PERIODS_HTTPLOG", default=3)),
)

# Adds gRPC services
GRPC_FRAMEWORK = {
"ROOT_HANDLERS_HOOK": "weni.grpc.core.urls.grpc_handlers",
}

# --------------------------------------------------------------------------------------------------
# OpenID Connect settings
# https://mozilla-django-oidc.readthedocs.io/en/stable/installation.html#add-settings-to-settings-py
Expand All @@ -361,10 +349,6 @@ OIDC_EXEMPT_URL_PATTERNS = [re.compile(url) for url in env.list("OIDC_EXEMPT_URL
OIDC_EXEMPT_URLS = OIDC_EXEMPT_URL_PATTERNS + env.list("OIDC_EXEMPT_URLS", default=[])
OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS = env.int("OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS", default=(15 * 60))

# Tells Django to authenticate via OIDC
AUTHENTICATION_BACKENDS += ("weni.auth.backends.WeniOIDCAuthenticationBackend",)
OIDC_DRF_AUTH_BACKEND = "weni.auth.backends.WeniOIDCAuthenticationBackend"

# Used to enable authentication via Keycloak to legacy users
SECRET_KEY_CHECK_LEGACY_USER = env("SECRET_KEY_CHECK_LEGACY_USER")

Expand Down Expand Up @@ -454,14 +438,12 @@ if DISABLE_OIDC:

installed_apps_list = list(INSTALLED_APPS)
installed_apps_list.remove("mozilla_django_oidc")
installed_apps_list.remove("weni.auth")
INSTALLED_APPS = tuple(installed_apps_list)

LOGGING["loggers"].pop("mozilla_django_oidc")
LOGGING["loggers"].pop("weni_django_oidc")

authentication_backend_list = list(AUTHENTICATION_BACKENDS)
authentication_backend_list.remove("weni.auth.backends.WeniOIDCAuthenticationBackend")
AUTHENTICATION_BACKENDS = tuple(authentication_backend_list)

OIDC_DRF_AUTH_BACKEND = None
Expand Down

0 comments on commit 4644367

Please sign in to comment.