gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated (a30e02e7 -> 9279bf3a)


From: gnunet
Subject: [taler-exchange] branch master updated (a30e02e7 -> 9279bf3a)
Date: Thu, 02 Nov 2023 16:05:54 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository exchange.

    from a30e02e7 -typo
     new 70187238 /setup must come with client-id
     new 9279bf3a configure exchange as challenger client

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/kyclogic/plugin_kyclogic_oauth2.c | 34 ++++++++++++++++++----------------
 src/testing/taler-unified-setup.sh    | 17 +++++++++++++++++
 2 files changed, 35 insertions(+), 16 deletions(-)

diff --git a/src/kyclogic/plugin_kyclogic_oauth2.c 
b/src/kyclogic/plugin_kyclogic_oauth2.c
index c9e5d8dc..6e6051b6 100644
--- a/src/kyclogic/plugin_kyclogic_oauth2.c
+++ b/src/kyclogic/plugin_kyclogic_oauth2.c
@@ -336,6 +336,21 @@ oauth2_load_configuration (void *cls,
     oauth2_unload_configuration (pd);
     return NULL;
   }
+
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (ps->cfg,
+                                             provider_section_name,
+                                             "KYC_OAUTH2_CLIENT_ID",
+                                             &s))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               provider_section_name,
+                               "KYC_OAUTH2_CLIENT_ID");
+    oauth2_unload_configuration (pd);
+    return NULL;
+  }
+  pd->client_id = s;
+
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (ps->cfg,
                                              provider_section_name,
@@ -414,9 +429,10 @@ oauth2_load_configuration (void *cls,
     pd->authorize_url = GNUNET_strndup (s,
                                         extra - s);
     GNUNET_asprintf (&pd->setup_url,
-                     "%.*s/setup",
+                     "%.*s/setup/s",
                      (int) (slash - s),
-                     s);
+                     s,
+                     pd->client_id);
     GNUNET_free (s);
   }
   else
@@ -454,20 +470,6 @@ oauth2_load_configuration (void *cls,
   }
   pd->info_url = s;
 
-  if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_string (ps->cfg,
-                                             provider_section_name,
-                                             "KYC_OAUTH2_CLIENT_ID",
-                                             &s))
-  {
-    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                               provider_section_name,
-                               "KYC_OAUTH2_CLIENT_ID");
-    oauth2_unload_configuration (pd);
-    return NULL;
-  }
-  pd->client_id = s;
-
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (ps->cfg,
                                              provider_section_name,
diff --git a/src/testing/taler-unified-setup.sh 
b/src/testing/taler-unified-setup.sh
index 1d1dd40d..dd4356cf 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
 
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]