diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-11-02 16:05:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-11-02 16:05:47 +0100 |
commit | 9279bf3a2416172ce03613d71060306cff18a9fa (patch) | |
tree | 895a0f0afd6bcd7ccbfc685e2361c72f2c0715d0 | |
parent | 70187238c41f8eff29ea349fbb7b2ca478ae7de7 (diff) | |
download | exchange-9279bf3a2416172ce03613d71060306cff18a9fa.tar.xz |
configure exchange as challenger client
-rwxr-xr-x | src/testing/taler-unified-setup.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index 1d1dd40dd..dd4356cff 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -516,6 +516,23 @@ then challenger-dbinit -c "$CONF" --reset $USE_VALGRIND challenger-httpd -c "$CONF" -L "$LOGLEVEL" 2> challenger-httpd.log & echo " DONE" + for SECTION in $(taler-config -c "$CONF" -S | grep kyc-provider) + do + LOGIC=$(taler-config -c "$CONF" -s "$SECTION" -o "LOGIC") + if [ "${LOGIC}" = "oauth2" ] + then + INFO=$(taler-config -c "$CONF" -s "$SECTION" -o "KYC_OAUTH2_INFO_URL") + if [ "${CHALLENGER_URL}info" = "$INFO" ] + then + echo -n "Enabling Challenger client for $SECTION" + CLIENT_SECRET=$(taler-config -c "$CONF" -s "$SECTION" -o "CLIENT_SECRET") + REDIRECT_URI="${EXCHANGE_URL}kyc-proof/kyc-provider-example-challeger" + CLIENT_ID=$(challenger-admin --add="${CLIENT_SECRET}" "${REDIRECT_URI}") + taler-config -c "$CONF" -s "$SECTION" -o KYC_OAUTH2_CLIENT_ID -V "$CLIENT_ID" + echo " DONE" + fi + fi + done fi |