Add function generate_redirect_urls

This commit is contained in:
juarez
2023-11-23 10:38:50 +01:00
parent 8aa851bfe4
commit 72d37c87f9
3 changed files with 17 additions and 7 deletions

View File

@ -23,5 +23,5 @@ if [ "$ENABLE_DATASHIELD" == true ]; then
}]' > /tmp/bridgehead/opal-map/local.json
cp -f ./$PROJECT/modules/datashield-mappings.json /tmp/bridgehead/opal-map/central.json
chown -R bridgehead:docker /tmp/bridgehead/
generate_private_oidc_client "OIDC_CLIENT_SECRET" "https://${HOST}/opal/*"
generate_private_oidc_client "OIDC_CLIENT_SECRET" "$(generate_redirect_urls '/opal/*')"
fi

View File

@ -3,10 +3,5 @@
if [ "$ENABLE_TEILER" == true ];then
log INFO "Teiler setup detected -- will start Teiler services."
OVERRIDE+=" -f ./$PROJECT/modules/teiler-compose.yml"
redirect_urls="https://${HOST}/ccp-teiler/*"
host_without_proxy="$(echo "$HOST" | cut -d '.' -f1)"
if [[ "$HOST" != "$host_without_proxy" ]]; then
redirect_urls+=",https://$host_without_proxy/ccp-teiler/*"
fi
generate_public_oidc_client "OIDC_PUBLIC" "$redirect_urls"
generate_public_oidc_client "OIDC_PUBLIC" "$(generate_redirect_urls '/ccp-teiler/*')"
fi