Skip to content

Commit

Permalink
chore(docker-jans-persistence-loader): added password grantType to gr…
Browse files Browse the repository at this point in the history
…antTypesSupportedByDynamicRegistration (#8440)

Signed-off-by: iromli <isman.firmansyah@gmail.com>
Co-authored-by: Mohammad Abudayyeh <47318409+moabu@users.noreply.github.com>
  • Loading branch information
iromli and moabu committed May 8, 2024
1 parent 1b5f419 commit 4f540cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docker-jans-persistence-loader/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN python3 -m ensurepip \
# =====================

# janssenproject/jans SHA commit
ENV JANS_SOURCE_VERSION=cf875ec7fdba5785b37b839bfec04c700001252c
ENV JANS_SOURCE_VERSION=d2b6df1e15c6a94639cd39737f9f41e7cfaf341f
ARG JANS_SETUP_DIR=jans-linux-setup/jans_setup
ARG JANS_SCRIPT_CATALOG_DIR=docs/script-catalog
ARG JANS_CONFIG_API_RESOURCES=jans-config-api/server/src/main/resources
Expand Down
17 changes: 7 additions & 10 deletions docker-jans-persistence-loader/scripts/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,22 +269,19 @@ def transform_auth_dynamic_config_hook(conf, manager):

# dynamicGrantTypeDefault changed to grantTypesSupportedByDynamicRegistration
if "grantTypesSupportedByDynamicRegistration" not in conf:
conf["grantTypesSupportedByDynamicRegistration"] = conf.pop("dynamicGrantTypeDefault", [
"urn:ietf:params:oauth:grant-type:uma-ticket",
"implicit",
"urn:ietf:params:oauth:grant-type:token-exchange",
"urn:ietf:params:oauth:grant-type:device_code",
"client_credentials",
"refresh_token",
"authorization_code",
"tx_token",
])
conf["grantTypesSupportedByDynamicRegistration"] = conf.pop("dynamicGrantTypeDefault", [])
should_update = True

for grant_type in [
"authorization_code",
"implicit",
"client_credentials",
"refresh_token",
"urn:ietf:params:oauth:grant-type:uma-ticket",
"urn:ietf:params:oauth:grant-type:device_code",
"urn:ietf:params:oauth:grant-type:token-exchange",
"tx_token",
"password",
]:
if grant_type not in conf["grantTypesSupportedByDynamicRegistration"]:
conf["grantTypesSupportedByDynamicRegistration"].append(grant_type)
Expand Down

0 comments on commit 4f540cb

Please sign in to comment.