exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 70187238c41f8eff29ea349fbb7b2ca478ae7de7
parent a30e02e7dc75cff445e1be7490ad3cc911bdbd6e
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu,  2 Nov 2023 15:55:24 +0100

/setup must come with client-id

Diffstat:
Msrc/kyclogic/plugin_kyclogic_oauth2.c | 34++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)

diff --git 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 @@ -457,20 +473,6 @@ oauth2_load_configuration (void *cls, 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, "KYC_OAUTH2_CLIENT_SECRET", &s)) {