Compare commits

..

No commits in common. "main" and "0.2.0+5.82.0-wordpress-php8.1" have entirely different histories.

4 changed files with 3 additions and 17 deletions

View File

@ -61,7 +61,7 @@ services:
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "coop-cloud.${STACK_NAME}.version=0.3.0+5.82.0-wordpress-php8.1"
- "coop-cloud.${STACK_NAME}.version=0.2.0+5.82.0-wordpress-php8.1"
- "backupbot.backup=true"
- "backupbot.backup.path=/var/www/html/wp-content/uploads"
healthcheck:

View File

@ -89,45 +89,33 @@ pushd /var/www/html/wp-content/uploads/civicrm/
fi
popd
OPEN_ID_CLIENT_ID="${OPEN_ID_CLIENT_ID:-unused}"
if [ "$OPEN_ID_CLIENT_ID" != "unused" ]; then
if [[ -n "${OPEN_ID_CLIENT_ID}" ]]; then
# install OpenID Connect Generic plugin
if ! su civicrm -c "wp plugin is-installed daggerhart-openid-connect-generic"; then
echo "============ Running OpenId Connect Install ============"
su civicrm -c "wp plugin install daggerhart-openid-connect-generic --activate"
else
echo "OpenID Connect Generic Plugin already installed"
fi
# if openid connect hasn't been configured, insert default settings
if ! su civicrm -c "wp option get openid_connect_generic_settings"; then
echo "Configuring OpenId Connect Plugin default settings"
su civicrm -c "wp option add openid_connect_generic_settings --format=json < /usr/local/etc/civicrm/openid_settings.json"
else
echo "OpenId Connect Plugin default settings already present"
fi
echo "============ Configuring OpenId Connect ============"
su civicrm -c "wp option patch update openid_connect_generic_settings client_id $OPEN_ID_CLIENT_ID"
su civicrm -c "wp option patch update openid_connect_generic_settings client_secret $OPEN_ID_CLIENT_SECRET"
su civicrm -c "wp option patch update openid_connect_generic_settings link_existing_users 1"
AUTHENTIK_DOMAIN="${AUTHENTIK_DOMAIN:-unused}"
if [ "$AUTHENTIK_DOMAIN" != "unused" ]; then
echo "============ Configuring Authentik ============"
if [[ -n "${AUTHENTIK_DOMAIN}" ]]; then
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_login https://$AUTHENTIK_DOMAIN/application/o/authorize/"
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_userinfo https://$AUTHENTIK_DOMAIN/application/o/userinfo/"
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_token https://$AUTHENTIK_DOMAIN/application/o/token/"
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_end_session https://$AUTHENTIK_DOMAIN/application/o/wordpress/end-session/"
else
echo "============ Configuring Generic OpenId Provider ============"
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_login $OPEN_ID_PROVIDER_LOGIN_URL"
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_userinfo $OPEN_ID_USERINFO_URL"
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_token $OPEN_ID_TOKEN_ENDPOINT_URL"
su civicrm -c "wp option patch update openid_connect_generic_settings endpoint_end_session $OPEN_ID_END_SESSION_URL"
fi
else
echo "not using OpenIdConnect"
fi
echo "============ Setting up cron ============"

View File

@ -1 +0,0 @@
Fix bug when not using openid

View File

@ -1 +0,0 @@
openid connect link existing users by default