Skip to content

Commit 6444e12

Browse files
authored
Remove unused auth_aliases when building app kwargs (#1075)
1 parent f5a9fa9 commit 6444e12

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tiled/config.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def construct_build_app_kwargs(
8484
if age in auth_spec:
8585
auth_spec[age] = timedelta(seconds=auth_spec[age])
8686
access_control = config.get("access_control", {}) or {}
87-
auth_aliases = {} # TODO Enable entrypoint as alias for authenticator_class?
8887
providers = list(auth_spec.get("providers", []))
8988
provider_names = [p["provider"] for p in providers]
9089
if len(set(provider_names)) != len(provider_names):
@@ -93,10 +92,9 @@ def construct_build_app_kwargs(
9392
f"Found duplicates in {providers}"
9493
)
9594
for i, authenticator in enumerate(providers):
96-
import_path = auth_aliases.get(
97-
authenticator["authenticator"], authenticator["authenticator"]
95+
authenticator_class = import_object(
96+
authenticator["authenticator"], accept_live_object=True
9897
)
99-
authenticator_class = import_object(import_path, accept_live_object=True)
10098
authenticator = authenticator_class(**authenticator.get("args", {}))
10199
# Replace "package.module:Object" with live instance.
102100
auth_spec["providers"][i]["authenticator"] = authenticator

0 commit comments

Comments
 (0)