Skip to content

Commit

Permalink
Lint ...
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Oct 1, 2024
1 parent 814dba8 commit 92b7899
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions galaxy_ng/app/dynaconf_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ def configure_keycloak(settings: Dynaconf) -> Dict[str, Any]:
KEYCLOAK_REALM = settings.get("KEYCLOAK_REALM", default=None)

KEYCLOAK_AUTH_PREFIX = settings.get("KEYCLOAK_AUTH_PREFIX", default="")
SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL = settings.get("SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL", default=None)
SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL = settings.get("SOCIAL_AUTH_ACCESS_TOKEN_URL", default=None)
SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL = \
settings.get("SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL", default=None)
SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL = \
settings.get("SOCIAL_AUTH_ACCESS_TOKEN_URL", default=None)

# Add settings if Social Auth values are provided
if all(
Expand Down Expand Up @@ -145,7 +147,10 @@ def configure_keycloak(settings: Dynaconf) -> Dict[str, Any]:
if SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL is None:
data[
"SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL"
] = f"{data['KEYCLOAK_URL']}/{KEYCLOAK_AUTH_PREFIX}realms/{KEYCLOAK_REALM}/protocol/openid-connect/token/"
] = (
f"{data['KEYCLOAK_URL']}/{KEYCLOAK_AUTH_PREFIX}realms/"
f"{KEYCLOAK_REALM}/protocol/openid-connect/token/"
)

data["SOCIAL_AUTH_LOGIN_REDIRECT_URL"] = settings.get(
"SOCIAL_AUTH_LOGIN_REDIRECT_URL", default="/ui/"
Expand Down

0 comments on commit 92b7899

Please sign in to comment.